diff --git a/hosts/kitty/default.nix b/hosts/kitty/default.nix index cbace57..bd03750 100644 --- a/hosts/kitty/default.nix +++ b/hosts/kitty/default.nix @@ -2,6 +2,7 @@ { imports = [ ./boot + ./filesystems ./firewall ./hardware ./users diff --git a/hosts/kitty/filesystems/default.nix b/hosts/kitty/filesystems/default.nix new file mode 100644 index 0000000..aaaf851 --- /dev/null +++ b/hosts/kitty/filesystems/default.nix @@ -0,0 +1,53 @@ +{ ... }: +{ + fileSystems = { + "/" = { + device = "/dev/disk/by-uuid/b8b7ed47-c98c-4a49-af01-b2832dde1287"; + fsType = "btrfs"; + options = [ "subvol=@" ]; + }; + "/home" = { + device = "/dev/disk/by-uuid/b8b7ed47-c98c-4a49-af01-b2832dde1287"; + fsType = "btrfs"; + options = [ "subvol=@home" ]; + }; + "/nix" = { + device = "/dev/disk/by-uuid/b8b7ed47-c98c-4a49-af01-b2832dde1287"; + fsType = "btrfs"; + options = [ "subvol=@nix" ]; + }; + "/var" = { + device = "/dev/disk/by-uuid/acf95700-8669-45c7-9a72-bf3215b3c325"; + fsType = "btrfs"; + options = [ "subvol=@var" ]; + }; + "/boot" = { + device = "/dev/disk/by-uuid/CD94-1D3F"; + fsType = "vfat"; + options = [ "fmask=0022" "dmask=0022" ]; + }; + + # Subvols and bindmounts + "/persist" = { + device = "/dev/disk/by-uuid/acf95700-8669-45c7-9a72-bf3215b3c325"; + fsType = "btrfs"; + options = [ "subvol=persist" "compress=zstd" ]; + }; + "/export/JimboNFS" = { + depends = [ "/persist" ]; + device = "/persist/export/JimboNFS"; + fsType = "none"; + options = [ "bind" ]; + }; + "/srv/minecraft" = { + depends = [ "/persist" ]; + device = "/persist/srv/minecraft"; + fsType = "none"; + options = [ "bind" ]; + }; + }; + + swapDevices = [ + { device = "/dev/disk/by-uuid/57178cfc-3e71-4d35-8c7f-e355f9dc84df"; } + ]; +} diff --git a/hosts/kitty/hardware/default.nix b/hosts/kitty/hardware/default.nix index 23ac7da..ebb576a 100644 --- a/hosts/kitty/hardware/default.nix +++ b/hosts/kitty/hardware/default.nix @@ -1,73 +1,7 @@ -{ config, lib, pkgs, modulesPath, ... }: +{ config, lib, ... }: { - boot = { - initrd = { - availableKernelModules = [ - "xhci_pci" - "ehci_pci" - "ahci" - "nvme" - "usbhid" - "sd_mod" - "sr_mod" - ]; - kernelModules = [ - "kvm-intel" - ]; - }; - }; - - # Main root - fileSystems = { - "/" = { - device = "/dev/disk/by-uuid/b8b7ed47-c98c-4a49-af01-b2832dde1287"; - fsType = "btrfs"; - options = [ "subvol=@" ]; - }; - "/home" = { - device = "/dev/disk/by-uuid/b8b7ed47-c98c-4a49-af01-b2832dde1287"; - fsType = "btrfs"; - options = [ "subvol=@home" ]; - }; - "/nix" = { - device = "/dev/disk/by-uuid/b8b7ed47-c98c-4a49-af01-b2832dde1287"; - fsType = "btrfs"; - options = [ "subvol=@nix" ]; - }; - "/var" = { - device = "/dev/disk/by-uuid/acf95700-8669-45c7-9a72-bf3215b3c325"; - fsType = "btrfs"; - options = [ "subvol=@var" ]; - }; - "/boot" = { - device = "/dev/disk/by-uuid/CD94-1D3F"; - fsType = "vfat"; - options = [ "fmask=0022" "dmask=0022" ]; - }; - - # Subvols and bindmounts - "/persist" = { - device = "/dev/disk/by-uuid/acf95700-8669-45c7-9a72-bf3215b3c325"; - fsType = "btrfs"; - options = [ "subvol=persist" "compress=zstd" ]; - }; - "/export/JimboNFS" = { - depends = [ "/persist" ]; - device = "/persist/export/JimboNFS"; - fsType = "none"; - options = [ "bind" ]; - }; - "/srv/minecraft" = { - depends = [ "/persist" ]; - device = "/persist/srv/minecraft"; - fsType = "none"; - options = [ "bind" ]; - }; - }; - - swapDevices = [ - { device = "/dev/disk/by-uuid/57178cfc-3e71-4d35-8c7f-e355f9dc84df"; } - ]; + boot.initrd.availableKernelModules = [ "xhci_pci" "ehci_pci" "ahci" "nvme" "usbhid" "sd_mod" "sr_mod" ]; + boot.initrd.kernelModules = [ "kvm-intel" ]; networking.useDHCP = lib.mkDefault true; nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; diff --git a/hosts/prophet/hardware/default.nix b/hosts/prophet/hardware/default.nix index 6993892..1ae1ae5 100644 --- a/hosts/prophet/hardware/default.nix +++ b/hosts/prophet/hardware/default.nix @@ -1,13 +1,8 @@ { config, lib, pkgs, modulesPath, ... }: { boot.initrd = { - availableKernelModules = [ - "xhci_pci" - "virtio_scsi" - ]; - kernelModules = [ - "dm-snapshot" - ]; + availableKernelModules = [ "xhci_pci" "virtio_scsi" ]; + kernelModules = [ "dm-snapshot" ]; }; fileSystems = {