diff --git a/flake.nix b/flake.nix index 99e7f0c2..05eb6b53 100644 --- a/flake.nix +++ b/flake.nix @@ -67,6 +67,7 @@ hostChannels = { tower = stable; + detritus = stable; intuos = stable; jupiter = unstable; diff --git a/hosts/detritus/boot/default.nix b/hosts/detritus/boot/default.nix new file mode 100644 index 00000000..225455a3 --- /dev/null +++ b/hosts/detritus/boot/default.nix @@ -0,0 +1,12 @@ +{ pkgs, ... }: +{ + boot = { + kernelPackages = pkgs.linuxPackages_latest; + kernelParams = [ + "amdgpu.cik_support=1" + "radeon.cik_support=0" + ]; + loader.grub.enable = true; + plymouth.enable = true; + }; +} diff --git a/hosts/detritus/default.nix b/hosts/detritus/default.nix new file mode 100644 index 00000000..261c98a0 --- /dev/null +++ b/hosts/detritus/default.nix @@ -0,0 +1,18 @@ +{ ... }: +{ + imports = [ + ./boot + ./disko + ./filesystems + ./hardware + ./user + ../../modules/system + ]; + + networking.hostName = "detritus"; + + system = { + desktop.enable = true; + stateVersion = "24.11"; + }; +} diff --git a/hosts/detritus/disko/default.nix b/hosts/detritus/disko/default.nix new file mode 100644 index 00000000..b4d328cf --- /dev/null +++ b/hosts/detritus/disko/default.nix @@ -0,0 +1,106 @@ +{ config, disko, ... }: +{ + imports = [ disko.nixosModules.disko ]; + + disko.devices = { + disk = { + "${config.networking.hostName}" = { + type = "disk"; + device = "/dev/nvme0n1"; + content = { + type = "gpt"; + partitions = { + boot = { + size = "1M"; + type = "EF02"; + }; + ESP = { + size = "2G"; + type = "EF00"; + content = { + type = "filesystem"; + format = "vfat"; + mountpoint = "/boot"; + mountOptions = [ "umask=0077" ]; + }; + }; + luks = { + size = "100%"; + content = { + type = "luks"; + name = "${config.networking.hostName}-disk"; + settings.allowDiscards = true; + passwordFile = "/tmp/secret.key"; + content = { + type = "lvm_pv"; + vg = "${config.networking.hostName}"; + }; + }; + }; + }; + }; + }; + }; + + lvm_vg = { + "${config.networking.hostName}" = { + type = "lvm_vg"; + lvs = { + root = { + size = "100%"; + content = { + type = "btrfs"; + extraArgs = [ "-f" ]; + subvolumes = { + "/root" = { + mountpoint = "/"; + mountOptions = [ + "compress=zstd" + "ssd" + ]; + }; + "/prev" = { + mountpoint = "/prev"; + mountOptions = [ + "compress=zstd" + "noexec" + "ssd" + ]; + }; + "/nix" = { + mountpoint = "/nix"; + mountOptions = [ + "compress=zstd" + "ssd" + ]; + }; + + # Impermanence + "/persist" = { + mountpoint = "/persist"; + mountOptions = [ + "compress=zstd" + "ssd" + ]; + }; + "/persist/.snapshots" = { }; + "/persist/home" = { }; + "/persist/home/.snapshots" = { }; + }; + }; + }; + swap = { + size = "8G"; + content = { + type = "swap"; + discardPolicy = "both"; + }; + }; + }; + }; + }; + }; + + # Needed for impermanence + fileSystems."/persist".neededForBoot = true; +} diff --git a/hosts/detritus/filesystems/default.nix b/hosts/detritus/filesystems/default.nix new file mode 100644 index 00000000..e9186cac --- /dev/null +++ b/hosts/detritus/filesystems/default.nix @@ -0,0 +1,33 @@ +{ config, ... }: +{ + fileSystems = { + # Network mounts + "/home/${config.sysusers.main}/Network/Midas" = { + device = "sv.nixfox.ca:/storage"; + fsType = "nfs4"; + options = [ + "noauto" + "soft" + "x-systemd.automount" + ]; + }; + "/home/${config.sysusers.main}/Network/Kitty" = { + device = "sv.nixfox.ca:/storage/bun"; + fsType = "nfs4"; + options = [ + "noauto" + "soft" + "x-systemd.automount" + ]; + }; + "/home/${config.sysusers.main}/Network/Prophet" = { + device = "mx.nixfox.ca:/storage"; + fsType = "nfs4"; + options = [ + "noauto" + "soft" + "x-systemd.automount" + ]; + }; + }; +} diff --git a/hosts/detritus/hardware/default.nix b/hosts/detritus/hardware/default.nix new file mode 100644 index 00000000..15af2604 --- /dev/null +++ b/hosts/detritus/hardware/default.nix @@ -0,0 +1,21 @@ +{ config, lib, modulesPath, ... }: +{ + imports = [ (modulesPath + "/installer/scan/not-detected.nix") ]; + + boot = { + initrd = { + availableKernelModules = [ + "ahci" + "ehci_pci" + "firewire_ohci" + "sd_mod" + "xhci_pci" + ]; + kernelModules = [ "dm-snapshot" ]; + }; + kernelModules = [ "kvm-intel" ]; + }; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; +} diff --git a/hosts/detritus/user/default.nix b/hosts/detritus/user/default.nix new file mode 100644 index 00000000..3ca3a690 --- /dev/null +++ b/hosts/detritus/user/default.nix @@ -0,0 +1,7 @@ +{ config, lib, ... }: +{ + home-manager.users."${config.sysusers.main}".home = { + guifull.enable = true; + stateVersion = lib.mkForce config.system.stateVersion; + }; +} diff --git a/hosts/redmond/boot/default.nix b/hosts/redmond/boot/default.nix index 9a94a6b2..d91be35e 100644 --- a/hosts/redmond/boot/default.nix +++ b/hosts/redmond/boot/default.nix @@ -3,8 +3,8 @@ boot = { kernelPackages = pkgs.linuxPackages_latest; kernelParams = [ - "radeon.cik_support=0" "amdgpu.cik_support=1" + "radeon.cik_support=0" ]; loader.systemd-boot.enable = true; plymouth.enable = true; diff --git a/hosts/tower/disko/default.nix b/hosts/tower/disko/default.nix index a5d6345a..b4d328cf 100644 --- a/hosts/tower/disko/default.nix +++ b/hosts/tower/disko/default.nix @@ -7,7 +7,6 @@ "${config.networking.hostName}" = { type = "disk"; device = "/dev/nvme0n1"; - imageSize = "32G"; content = { type = "gpt"; partitions = { diff --git a/modules/home/variables/displays/default.nix b/modules/home/variables/displays/default.nix index 99f17bf3..883ae4d6 100644 --- a/modules/home/variables/displays/default.nix +++ b/modules/home/variables/displays/default.nix @@ -10,7 +10,7 @@ tower3 = "Eizo Nanao Corporation CG223W 23252050"; tower4 = "Samsung Electric Company SAMSUNG Unknown"; - estradiol1 = "Dell Inc. DELL P2214H KW14V4965YKS"; - estradiol2 = "HannStar Display Corp iP192A 051AW1WY03797"; + detritus1 = "Dell Inc. DELL P2214H KW14V4965YKS"; + detritus2 = "HannStar Display Corp iP192A 051AW1WY03797"; }; } diff --git a/modules/home/wms/programs/kanshi/default.nix b/modules/home/wms/programs/kanshi/default.nix index 7676b241..0aeb5e8f 100644 --- a/modules/home/wms/programs/kanshi/default.nix +++ b/modules/home/wms/programs/kanshi/default.nix @@ -40,14 +40,14 @@ { profile = { - name = "estradiol"; + name = "detritus"; outputs = [ { - criteria = config.displays.estradiol1; + criteria = config.displays.detritus1; position = "0,0"; } { - criteria = config.displays.estradiol2; + criteria = config.displays.detritus2; position = "1920,0"; scale = 0.85; } diff --git a/modules/home/wms/programs/waybar/default.nix b/modules/home/wms/programs/waybar/default.nix index 94a9d228..35aadb64 100644 --- a/modules/home/wms/programs/waybar/default.nix +++ b/modules/home/wms/programs/waybar/default.nix @@ -246,7 +246,7 @@ output = [ "!${config.displays.tower2}" "!${config.displays.tower3}" - "!${config.displays.estradiol2}" + "!${config.displays.detritus2}" "*" ]; modules-left = [ @@ -299,7 +299,7 @@ output = [ config.displays.tower2 config.displays.tower3 - config.displays.estradiol2 + config.displays.detritus2 ]; modules-left = [ "sway/workspaces" diff --git a/modules/home/wms/sway/outputs/default.nix b/modules/home/wms/sway/outputs/default.nix index eddb7965..e44120f2 100644 --- a/modules/home/wms/sway/outputs/default.nix +++ b/modules/home/wms/sway/outputs/default.nix @@ -40,9 +40,9 @@ (assign "${config.displays.tower3}" workspaces3) ++ (assign "${config.displays.tower4}" workspaces4) ++ - (assign "${config.displays.estradiol1}" workspaces1) ++ - (assign "${config.displays.estradiol1}" workspaces2) ++ - (assign "${config.displays.estradiol2}" workspaces3) ++ - (assign "${config.displays.estradiol2}" workspaces4); + (assign "${config.displays.detritus1}" workspaces1) ++ + (assign "${config.displays.detritus1}" workspaces2) ++ + (assign "${config.displays.detritus2}" workspaces3) ++ + (assign "${config.displays.detritus2}" workspaces4); }; } diff --git a/modules/home/wms/sway/theme/default.nix b/modules/home/wms/sway/theme/default.nix index f50c87dc..b28ebae3 100644 --- a/modules/home/wms/sway/theme/default.nix +++ b/modules/home/wms/sway/theme/default.nix @@ -60,7 +60,7 @@ "${config.displays.tower2}".bg = "${builtins.toString ./wallpapers/2.png} fill"; "${config.displays.tower3}".bg = "${builtins.toString ./wallpapers/3.png} fill"; - "${config.displays.estradiol2}".bg = "${builtins.toString ./wallpapers/2.png} fill"; + "${config.displays.detritus2}".bg = "${builtins.toString ./wallpapers/2.png} fill"; }; }; }