Nixos and nixflake shit. Non working changes.

The last of my fucking around with Nix and Flakes prior to killing the
nixos portion of my k8s project. This was just too hard to figure out,
honestly. Docs around nixflakes suck. They appear to be the future! I
believe the hype! But I can't figure out DICK ALL.

Committing, will probably rip out once I'm fully over on PM.
master
josiah 10 months ago
parent 7b38b89acb
commit 32eaca73d0

@ -31,6 +31,32 @@
]; ];
}; };
nixosConfigurations.hoyden = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
../hosts/hoyden/configuration.nix
../common/default.nix
];
};
deploy.nodes.hoyden = {
hostname = "hoyden";
user = "root";
sshUser = "josiah";
# magicRollback = false;
remoteBuild = false;
path = deploy-rs.lib.x86_64-linux.activate.nixos
self.nixosConfigurations.hoyden;
# This forces ssh to connect over IPv4.
sshOpts = [ "-4" ];
profiles.system = {
path = deploy-rs.lib.x86_64-linux.activate.nixos
self.nixosConfigurations.hoyden;
};
};
deploy.nodes.seraph = { deploy.nodes.seraph = {
hostname = "seraph"; hostname = "seraph";
user = "root"; user = "root";

@ -4,11 +4,7 @@
{ config, pkgs, ... }: { config, pkgs, ... }:
let {
unstableTarball = fetchTarball
"https://github.com/NixOS/nixpkgs/archive/nixos-unstable.tar.gz";
in {
imports = [ # Include the results of the hardware scan. imports = [ # Include the results of the hardware scan.
./hardware-configuration.nix ./hardware-configuration.nix
]; ];
@ -78,26 +74,6 @@ in {
}; };
nix.settings.experimental-features = [ "nix-command" "flakes" ]; nix.settings.experimental-features = [ "nix-command" "flakes" ];
# This is probalby not gonna work, but is a rough analogue to what I did before
# pkgs.writeTextFile {
# name = "plasma-awesome-xsession";
# destination = "/share/xsessions/plasma-awesome.desktop";
# text = ''
# [Desktop Entry]
# Type=XSession
# Exec=env KDEWM=/run/current-system/sw/bin/awesome /run/current-system/sw/bin/startplasma-x11
# DesktopNames=KDE (awesome)
# Name=Plasma (awesome)
# Comment=Plasma by KDE w/awesome
# '';
# } // {
# providedSessions = [ "plasma-awesome" ];
# }
# Configure keymap in X11
# services.xserver.layout = "us";
# services.xserver.xkbOptions = "eurosign:e";
# Enable CUPS to print documents. # Enable CUPS to print documents.
# services.printing.enable = true; # services.printing.enable = true;
@ -135,7 +111,7 @@ in {
nixpkgs.config = { nixpkgs.config = {
packageOverrides = pkgs: { packageOverrides = pkgs: {
unstable = import unstableTarball { config = config.nixpkgs.config; }; unstable = import attrs.unstableTarball { config = config.nixpkgs.config; };
}; };
permittedInsecurePackages = [ permittedInsecurePackages = [
"python2.7-certifi-2021.10.8" "python2.7-certifi-2021.10.8"
@ -146,10 +122,11 @@ in {
# build shit # build shit
morph # ultimately this seems not useful to me; weird errors. morph # ultimately this seems not useful to me; weird errors.
nixops nixops
deploy-rs unstable.deploy-rs
autoconf autoconf
yarn yarn
automake automake
direnv
gnumake gnumake
wget wget
gcc-arm-embedded gcc-arm-embedded
@ -286,21 +263,6 @@ in {
fsType = "nfs"; fsType = "nfs";
}; };
# this doens't work right
# fileSystems."/home/josiah/network-share/sainthood/homes" = {
# #device = "//sainthood.home.jowj.net/volume3/homes/";
# device = "//sainthood.home.jowj.net//volume3/homes/";
# fsType = "cifs";
# options = let
# # this line prevents hanging on network split
# automount_opts = "x-systemd.automount,noauto,x-systemd.idle-timeout=60,x-systemd.device-timeout=5s,x-systemd.mount-timeout=5s";
# in ["${automount_opts},credentials=/etc/nixos/smb-secrets"];
# };
# Open ports in the firewall.
# networking.firewall.allowedTCPPorts = [ ... ];
# networking.firewall.allowedUDPPorts = [ ... ];
# Or disable the firewall altogether.
networking.firewall.enable = false; networking.firewall.enable = false;
# This value determines the NixOS release from which the default # This value determines the NixOS release from which the default
@ -312,4 +274,3 @@ in {
system.stateVersion = "21.11"; # Did you read the comment? system.stateVersion = "21.11"; # Did you read the comment?
} }

@ -0,0 +1,25 @@
{
description = "Hoyden's Flake";
inputs = {
nixpkgs.url =
"github:nixos/nixpkgs/nixos-22.05"; # change this to your desired NixOS version
# For accessing `deploy-rs`'s utility Nix functions
deploy-rs.url = "github:serokell/deploy-rs";
unstableTarball = fetchTarball
"https://github.com/NixOS/nixpkgs/archive/nixos-unstable.tar.gz";
};
outputs = { self, nixpkgs, unstableTarball }@attrs: {
nixosConfigurations.hoyden = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
specialArgs = attrs;
modules = [ ./configuration.nix ];
};
};
}
Loading…
Cancel
Save