diff --git a/hosts/jupiter/hardware-configuration.nix b/hosts/jupiter/hardware-configuration.nix index 69afaaf..7aeaea6 100644 --- a/hosts/jupiter/hardware-configuration.nix +++ b/hosts/jupiter/hardware-configuration.nix @@ -35,7 +35,8 @@ # }; boot.kernelModules = [ "kvm-intel" ]; boot.extraModulePackages = [ ]; - boot.tmp.useTmpfs = true; + boot.tmp.useTmpfs = false; + boot.tmp.cleanOnBoot = true; zramSwap.enable = true; services.btrfs.autoScrub = { @@ -126,6 +127,12 @@ options = [ "compress=zstd,space_cache=v2,ssd,noatime,subvol=@nix,discard=async" ]; }; + fileSystems."/swap" = + { device = "/dev/disk/by-label/NIXROOT"; + fsType = "btrfs"; + options = [ "compress=zstd,space_cache=v2,ssd,noatime,subvol=@swap,discard=async" ]; + }; + fileSystems."/mnt/snapshots/root" = { device = "/dev/disk/by-label/NIXROOT"; fsType = "btrfs"; @@ -171,7 +178,7 @@ options = [ "bind" ]; }; - swapDevices = [ ]; + swapDevices = [ { device = "/swap/swapfile"; } ]; networking = { vswitches = { diff --git a/hosts/nas/hardware-configuration.nix b/hosts/nas/hardware-configuration.nix index 42b56d8..6217b65 100644 --- a/hosts/nas/hardware-configuration.nix +++ b/hosts/nas/hardware-configuration.nix @@ -35,7 +35,8 @@ }; boot.kernelModules = [ "kvm-intel" ]; boot.extraModulePackages = [ ]; - boot.tmp.useTmpfs = true; + boot.tmp.useTmpfs = false; + boot.tmp.cleanOnBoot = true; zramSwap.enable = true; services.btrfs.autoScrub = { @@ -126,6 +127,12 @@ options = [ "compress=zstd,space_cache=v2,ssd,noatime,subvol=@nix,discard=async" ]; }; + fileSystems."/swap" = + { device = "/dev/disk/by-label/NIXROOT"; + fsType = "btrfs"; + options = [ "compress=zstd,space_cache=v2,ssd,noatime,subvol=@swap,discard=async" ]; + }; + fileSystems."/mnt/snapshots/root" = { device = "/dev/disk/by-label/NIXROOT"; fsType = "btrfs"; @@ -171,7 +178,7 @@ options = [ "bind" ]; }; - swapDevices = [ ]; + swapDevices = [ { device = "/swap/swapfile"; } ]; networking = { vswitches = { diff --git a/hosts/server/hardware-configuration.nix b/hosts/server/hardware-configuration.nix index 4e3d947..867544e 100644 --- a/hosts/server/hardware-configuration.nix +++ b/hosts/server/hardware-configuration.nix @@ -21,7 +21,8 @@ boot.initrd.kernelModules = [ "vfio_pci" "vfio" "vfio_iommu_type1" ]; boot.kernelModules = [ "kvm-amd" ]; boot.extraModulePackages = [ ]; - boot.tmp.useTmpfs = true; + boot.tmp.useTmpfs = false; + boot.tmp.cleanOnBoot = true; zramSwap.enable = true; services.btrfs.autoScrub = { @@ -83,6 +84,12 @@ options = [ "compress=zstd,space_cache=v2,ssd,noatime,subvol=@nix,discard=async" ]; }; + fileSystems."/swap" = + { device = "/dev/disk/by-label/NIXROOT"; + fsType = "btrfs"; + options = [ "compress=zstd,space_cache=v2,ssd,noatime,subvol=@swap,discard=async" ]; + }; + fileSystems."/mnt/snapshots/root" = { device = "/dev/disk/by-label/NIXROOT"; fsType = "btrfs"; @@ -90,7 +97,7 @@ }; - swapDevices = [ ]; + swapDevices = [ { device = "/swap/swapfile"; } ]; networking = { useDHCP = false; # Deprecated diff --git a/hosts/steamdeck/hardware-configuration.nix b/hosts/steamdeck/hardware-configuration.nix index 4dc80e9..0a999c7 100644 --- a/hosts/steamdeck/hardware-configuration.nix +++ b/hosts/steamdeck/hardware-configuration.nix @@ -21,9 +21,9 @@ boot.initrd.kernelModules = [ ]; boot.kernelModules = [ "kvm-amd" ]; boot.extraModulePackages = [ ]; - boot.kernelParams = [ ]; - boot.tmp.useTmpfs = true; -# zramSwap.enable = true; + boot.tmp.useTmpfs = false; + boot.tmp.cleanOnBoot = true; + zramSwap.enable = true; # services.btrfs.autoScrub = { # enable = true;