diff options
| -rw-r--r-- | hosts/copenhagen/configuration.nix | 39 | ||||
| -rw-r--r-- | snowfall/systems/x86_64-linux/copenhagen/default.nix | 20 | ||||
| -rw-r--r-- | snowfall/systems/x86_64-linux/copenhagen/hardware.nix (renamed from hosts/copenhagen/hardware.nix) | 17 | ||||
| -rw-r--r-- | snowfall/systems/x86_64-linux/copenhagen/network.nix | 20 |
4 files changed, 48 insertions, 48 deletions
diff --git a/hosts/copenhagen/configuration.nix b/hosts/copenhagen/configuration.nix index f66a1a9..73cacac 100644 --- a/hosts/copenhagen/configuration.nix +++ b/hosts/copenhagen/configuration.nix @@ -1,45 +1,15 @@ { config, lib, pkgs, inputs, ... }: { - imports = [ - ./hardware.nix - ../../core - ../../roles - ]; - - nix.settings.experimental-features = [ "nix-command" "flakes" ]; - environment.persistence."/persist/system" = { - hideMounts = true; - directories = [ - "/etc/nixos" - "/var/log" - "/var/lib/nixos" - "/var/lib/systemd/coredump" - "/var/lib/acme" "/srv/web" "/srv/minecraft" ]; - - files = [ - "/etc/machine-id" - ]; }; - programs.fuse.userAllowOther = true; - - networking = { - hostName = "copenhagen"; - hostId = "a50062ff"; - - useDHCP = true; - }; - - time.timeZone = "America/Los_Angeles"; - users.users = { root.hashedPasswordFile = "/secrets/passwords/root"; @@ -54,13 +24,6 @@ }; }; - home-manager = { - extraSpecialArgs = { inherit inputs; }; - users = { - "c" = import ./home/c.nix; - }; - }; - roles = { minecraft = { enable = true; @@ -106,6 +69,4 @@ environment.systemPackages = with pkgs; [ ffmpeg ]; - - system.stateVersion = "23.11"; } diff --git a/snowfall/systems/x86_64-linux/copenhagen/default.nix b/snowfall/systems/x86_64-linux/copenhagen/default.nix new file mode 100644 index 0000000..38705a8 --- /dev/null +++ b/snowfall/systems/x86_64-linux/copenhagen/default.nix @@ -0,0 +1,20 @@ +{ lib, pkgs, namespace, ... }: + +with lib; with lib.${namespace}; { + imports = [ + ./hardware.nix + ./network.nix + ]; + + cxl = { + system = { + hostname = "copenhagen"; + id = "a50062ff"; + + impermanence.enable = true; + impermanence.home.enable = true; + }; + }; + + system.stateVersion = "23.11"; +}
\ No newline at end of file diff --git a/hosts/copenhagen/hardware.nix b/snowfall/systems/x86_64-linux/copenhagen/hardware.nix index 7c0a1f3..c248fcf 100644 --- a/hosts/copenhagen/hardware.nix +++ b/snowfall/systems/x86_64-linux/copenhagen/hardware.nix @@ -1,10 +1,6 @@ { config, lib, pkgs, modulesPath, ... }: { - imports = [ - (modulesPath + "/installer/scan/not-detected.nix") - ]; - boot = { loader.grub = { enable = true; @@ -22,9 +18,10 @@ availableKernelModules = [ "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ]; kernelModules = [ ]; - postDeviceCommands = lib.mkAfter '' - zfs rollback -r zpool/root@blank && zfs rollback -r zpool/home@blank - ''; + #TODO: re-enable impermanence + # postDeviceCommands = lib.mkAfter '' + # zfs rollback -r zpool/root@blank && zfs rollback -r zpool/home@blank + # ''; postMountCommands = lib.mkAfter '' chmod u=rw,g=,o= /secrets @@ -51,6 +48,8 @@ swapDevices = [ ]; - nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; - hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; + hardware.enableRedistributableFirmware = true; + hardware.cpu.intel.updateMicrocode = true; + + nixpkgs.hostPlatform = "x86_64-linux"; } diff --git a/snowfall/systems/x86_64-linux/copenhagen/network.nix b/snowfall/systems/x86_64-linux/copenhagen/network.nix new file mode 100644 index 0000000..affe697 --- /dev/null +++ b/snowfall/systems/x86_64-linux/copenhagen/network.nix @@ -0,0 +1,20 @@ +{ ... }: + +{ + networking = { + useDHCP = true; + + wireless = { + enable = true; + + # Import /etc/wpa_supplicant.conf networks + allowAuxiliaryImperativeNetworks = true; + }; + + firewall.enable = true; + }; + + environment.etc."wpa_supplicant.conf" = { + source = "/secrets/wireless.conf"; + }; +} |