From e8077fde966e051fc449fffcfa061c7f7edc47b0 Mon Sep 17 00:00:00 2001 From: Caroline Larimore Date: Mon, 14 Apr 2025 19:01:38 -0700 Subject: migration: finalize --- snowfall/systems/x86_64-linux/c-pc/default.nix | 62 ------------------ snowfall/systems/x86_64-linux/c-pc/hardware.nix | 58 ----------------- snowfall/systems/x86_64-linux/c-pc/network.nix | 25 ------- .../systems/x86_64-linux/copenhagen/default.nix | 76 ---------------------- .../systems/x86_64-linux/copenhagen/hardware.nix | 55 ---------------- .../systems/x86_64-linux/copenhagen/network.nix | 8 --- 6 files changed, 284 deletions(-) delete mode 100644 snowfall/systems/x86_64-linux/c-pc/default.nix delete mode 100644 snowfall/systems/x86_64-linux/c-pc/hardware.nix delete mode 100644 snowfall/systems/x86_64-linux/c-pc/network.nix delete mode 100644 snowfall/systems/x86_64-linux/copenhagen/default.nix delete mode 100644 snowfall/systems/x86_64-linux/copenhagen/hardware.nix delete mode 100644 snowfall/systems/x86_64-linux/copenhagen/network.nix (limited to 'snowfall/systems') diff --git a/snowfall/systems/x86_64-linux/c-pc/default.nix b/snowfall/systems/x86_64-linux/c-pc/default.nix deleted file mode 100644 index 33bec71..0000000 --- a/snowfall/systems/x86_64-linux/c-pc/default.nix +++ /dev/null @@ -1,62 +0,0 @@ -{ lib, pkgs, namespace, ... }: - -with lib; with lib.${namespace}; { - imports = [ - ./hardware.nix - ./network.nix - ]; - - cxl = { - system = { - hostname = "c-pc"; - id = "23ce94ff"; - - impermanence.enable = true; - impermanence.home.enable = true; - - fonts.nerdfonts = true; - fonts.extra = with pkgs; [ - minecraftia - ]; - }; - - suites = { - common.enable = true; - desktop.enable = true; - gaming.enable = true; - }; - - apps.i3 = { - videoDrivers = [ "amdgpu" ]; - #TODO: migrate to services.autorandr - setupCommands = '' - if ${pkgs.xorg.xrandr}/bin/xrandr --query | grep 2560x1080; then - ${pkgs.xorg.xrandr}/bin/xrandr --output DVI-D-0 --mode 1920x1080 --rate 60 --pos 0x0 - ${pkgs.xorg.xrandr}/bin/xrandr --output DisplayPort-2 --mode 2560x1080 --rate 60 --pos 1920x0 --primary - ${pkgs.xorg.xrandr}/bin/xrandr --output HDMI-A-0 --mode 1920x1080 --rate 75 --pos 4480x0 - elif ${pkgs.xorg.xrandr}/bin/xrandr --query | grep 2560x1440; then - ${pkgs.xorg.xrandr}/bin/xrandr --output DVI-D-0 --mode 1920x1080 --rate 60 --pos 0x360 - ${pkgs.xorg.xrandr}/bin/xrandr --output DisplayPort-2 --mode 2560x1440 --rate 165 --pos 1920x0 --primary - ${pkgs.xorg.xrandr}/bin/xrandr --output DisplayPort-1 --mode 1920x1200 --rate 60 --pos 4480x0 - fi - ''; - }; - }; - - services = { - printing.enable = true; - hardware.openrgb.enable = true; - udev.enable = true; - }; - - snowfallorg.users."c" = { - admin = true; - }; - - users.users = { - root.hashedPasswordFile = "/secrets/passwords/root"; - "c".hashedPasswordFile = "/secrets/passwords/c"; - }; - - system.stateVersion = "23.11"; -} diff --git a/snowfall/systems/x86_64-linux/c-pc/hardware.nix b/snowfall/systems/x86_64-linux/c-pc/hardware.nix deleted file mode 100644 index 8f7f8cd..0000000 --- a/snowfall/systems/x86_64-linux/c-pc/hardware.nix +++ /dev/null @@ -1,58 +0,0 @@ -{ config, lib, pkgs, modulesPath, ... }: - -{ - boot = { - loader.grub = { - enable = true; - - useOSProber = true; - - zfsSupport = true; - efiSupport = true; - efiInstallAsRemovable = true; - - mirroredBoots = [ - { devices = [ "nodev" ]; path = "/boot"; } - ]; - }; - - initrd = { - availableKernelModules = [ "xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod" ]; - kernelModules = [ "amdgpu" ]; - - #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 - ''; - }; - - kernelModules = [ "kvm-amd" ]; - extraModulePackages = [ ]; - - supportedFilesystems = [ "ntfs" ]; - }; - - fileSystems = { - "/" = { fsType = "zfs"; neededForBoot = true; device = "zpool/root"; }; - "/nix" = { fsType = "zfs"; neededForBoot = true; device = "zpool/nix"; }; - "/home" = { fsType = "zfs"; neededForBoot = true; device = "zpool/home"; }; - "/persist" = { fsType = "zfs"; neededForBoot = true; device = "zpool/persist"; }; - "/persist/secure" = { fsType = "zfs"; neededForBoot = true; device = "zpool/secure/persist"; }; - "/secrets" = { fsType = "zfs"; neededForBoot = true; device = "zpool/secure/secrets"; }; - - "/boot" = { fsType = "vfat"; device = "/dev/disk/by-uuid/12CE-A600"; }; - - "/mnt/4tb" = { fsType = "ext4"; device = "/dev/disk/by-label/4tb"; }; - }; - - swapDevices = [ ]; - - hardware.enableRedistributableFirmware = true; - hardware.cpu.amd.updateMicrocode = true; - - nixpkgs.hostPlatform = "x86_64-linux"; -} diff --git a/snowfall/systems/x86_64-linux/c-pc/network.nix b/snowfall/systems/x86_64-linux/c-pc/network.nix deleted file mode 100644 index aa7e075..0000000 --- a/snowfall/systems/x86_64-linux/c-pc/network.nix +++ /dev/null @@ -1,25 +0,0 @@ -{ ... }: - -{ - networking = { - useDHCP = true; - - wireless = { - enable = true; - - # Import /etc/wpa_supplicant.conf networks - allowAuxiliaryImperativeNetworks = true; - }; - - firewall = { - enable = false; - - allowedTCPPorts = [ 8096 50000 ]; - allowedUDPPorts = [ ]; - }; - }; - - environment.etc."wpa_supplicant.conf" = { - source = "/secrets/wireless.conf"; - }; -} diff --git a/snowfall/systems/x86_64-linux/copenhagen/default.nix b/snowfall/systems/x86_64-linux/copenhagen/default.nix deleted file mode 100644 index e893f43..0000000 --- a/snowfall/systems/x86_64-linux/copenhagen/default.nix +++ /dev/null @@ -1,76 +0,0 @@ -{ 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; - }; - - suites.common.enable = true; - - services = { - ssh = { - enable = true; - port = 42069; - }; - - web = { - personal.enable = true; - landing.enable = true; - images.enable = true; - stargazers.enable = true; - }; - - minecraft = { - stargazers = { - enable = true; - port = 25566; - }; - - zenith = { - enable = true; - port = 25569; - }; - }; - }; - }; - - services = { - pcscd.enable = true; - udev.enable = true; - }; - - snowfallorg.users."c" = { - admin = true; - - config = { - cxl.tools.git.key = "DE64538967CA0C68"; - }; - }; - - users.users = { - root.hashedPasswordFile = "/secrets/passwords/root"; - - "c" = { - hashedPasswordFile = "/secrets/passwords/c"; - - openssh.authorizedKeys.keys = [ - "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIDO8JxqS7B2n3YlNtlVMZGARi+GG/z7wLiiyl52qSZc caroline@larimo.re" # c-pc - "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAICGftQ5W8QMIVhgDijreliiMgIqwQvxwTkpMftJdQWu+ caroline@larimo.re" # phoenix - ]; - - extraGroups = [ "minecraft" ]; - }; - }; - - system.stateVersion = "23.11"; -} \ No newline at end of file diff --git a/snowfall/systems/x86_64-linux/copenhagen/hardware.nix b/snowfall/systems/x86_64-linux/copenhagen/hardware.nix deleted file mode 100644 index c248fcf..0000000 --- a/snowfall/systems/x86_64-linux/copenhagen/hardware.nix +++ /dev/null @@ -1,55 +0,0 @@ -{ config, lib, pkgs, modulesPath, ... }: - -{ - boot = { - loader.grub = { - enable = true; - - zfsSupport = true; - efiSupport = true; - efiInstallAsRemovable = true; - - mirroredBoots = [ - { devices = [ "nodev" ]; path = "/boot"; } - ]; - }; - - initrd = { - availableKernelModules = [ "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ]; - kernelModules = [ ]; - - #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 - ''; - }; - - kernelModules = [ "kvm-intel" ]; - extraModulePackages = [ ]; - - supportedFilesystems = [ "ntfs" ]; - }; - - fileSystems = { - "/" = { fsType = "zfs"; neededForBoot = true; device = "zpool/root"; }; - "/nix" = { fsType = "zfs"; neededForBoot = true; device = "zpool/nix"; }; - "/home" = { fsType = "zfs"; neededForBoot = true; device = "zpool/home"; }; - "/persist" = { fsType = "zfs"; neededForBoot = true; device = "zpool/persist"; }; - "/secrets" = { fsType = "zfs"; neededForBoot = true; device = "zpool/secrets"; }; - - "/boot" = { fsType = "vfat"; device = "/dev/disk/by-uuid/DF61-E3BD"; }; - - "/mnt/old" = { fsType = "ext4"; device = "/dev/disk/by-label/box"; }; - }; - - swapDevices = [ ]; - - 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 deleted file mode 100644 index eccc693..0000000 --- a/snowfall/systems/x86_64-linux/copenhagen/network.nix +++ /dev/null @@ -1,8 +0,0 @@ -{ ... }: - -{ - networking = { - useDHCP = true; - firewall.enable = true; - }; -} -- cgit v1.2.3