Compare commits

...

2 Commits

Author SHA1 Message Date
1402e6a7be
hosts: steamdeck: add decky 2023-09-23 09:20:32 +02:00
5153fb8150
hosts: *: remove tmpfs and add swap 2023-09-23 09:19:56 +02:00
5 changed files with 31 additions and 9 deletions

View File

@ -35,7 +35,8 @@
# }; # };
boot.kernelModules = [ "kvm-intel" ]; boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ]; boot.extraModulePackages = [ ];
boot.tmp.useTmpfs = true; boot.tmp.useTmpfs = false;
boot.tmp.cleanOnBoot = true;
zramSwap.enable = true; zramSwap.enable = true;
services.btrfs.autoScrub = { services.btrfs.autoScrub = {
@ -126,6 +127,12 @@
options = [ "compress=zstd,space_cache=v2,ssd,noatime,subvol=@nix,discard=async" ]; 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" = fileSystems."/mnt/snapshots/root" =
{ device = "/dev/disk/by-label/NIXROOT"; { device = "/dev/disk/by-label/NIXROOT";
fsType = "btrfs"; fsType = "btrfs";
@ -171,7 +178,7 @@
options = [ "bind" ]; options = [ "bind" ];
}; };
swapDevices = [ ]; swapDevices = [ { device = "/swap/swapfile"; } ];
networking = { networking = {
vswitches = { vswitches = {

View File

@ -35,7 +35,8 @@
}; };
boot.kernelModules = [ "kvm-intel" ]; boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ]; boot.extraModulePackages = [ ];
boot.tmp.useTmpfs = true; boot.tmp.useTmpfs = false;
boot.tmp.cleanOnBoot = true;
zramSwap.enable = true; zramSwap.enable = true;
services.btrfs.autoScrub = { services.btrfs.autoScrub = {
@ -126,6 +127,12 @@
options = [ "compress=zstd,space_cache=v2,ssd,noatime,subvol=@nix,discard=async" ]; 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" = fileSystems."/mnt/snapshots/root" =
{ device = "/dev/disk/by-label/NIXROOT"; { device = "/dev/disk/by-label/NIXROOT";
fsType = "btrfs"; fsType = "btrfs";
@ -171,7 +178,7 @@
options = [ "bind" ]; options = [ "bind" ];
}; };
swapDevices = [ ]; swapDevices = [ { device = "/swap/swapfile"; } ];
networking = { networking = {
vswitches = { vswitches = {

View File

@ -21,7 +21,8 @@
boot.initrd.kernelModules = [ "vfio_pci" "vfio" "vfio_iommu_type1" ]; boot.initrd.kernelModules = [ "vfio_pci" "vfio" "vfio_iommu_type1" ];
boot.kernelModules = [ "kvm-amd" ]; boot.kernelModules = [ "kvm-amd" ];
boot.extraModulePackages = [ ]; boot.extraModulePackages = [ ];
boot.tmp.useTmpfs = true; boot.tmp.useTmpfs = false;
boot.tmp.cleanOnBoot = true;
zramSwap.enable = true; zramSwap.enable = true;
services.btrfs.autoScrub = { services.btrfs.autoScrub = {
@ -83,6 +84,12 @@
options = [ "compress=zstd,space_cache=v2,ssd,noatime,subvol=@nix,discard=async" ]; 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" = fileSystems."/mnt/snapshots/root" =
{ device = "/dev/disk/by-label/NIXROOT"; { device = "/dev/disk/by-label/NIXROOT";
fsType = "btrfs"; fsType = "btrfs";
@ -90,7 +97,7 @@
}; };
swapDevices = [ ]; swapDevices = [ { device = "/swap/swapfile"; } ];
networking = { networking = {
useDHCP = false; # Deprecated useDHCP = false; # Deprecated

View File

@ -21,9 +21,9 @@
boot.initrd.kernelModules = [ ]; boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-amd" ]; boot.kernelModules = [ "kvm-amd" ];
boot.extraModulePackages = [ ]; boot.extraModulePackages = [ ];
boot.kernelParams = [ ]; boot.tmp.useTmpfs = false;
boot.tmp.useTmpfs = true; boot.tmp.cleanOnBoot = true;
# zramSwap.enable = true; zramSwap.enable = true;
# services.btrfs.autoScrub = { # services.btrfs.autoScrub = {
# enable = true; # enable = true;

View File

@ -27,6 +27,7 @@
devices.steamdeck = { devices.steamdeck = {
enable = true; enable = true;
}; };
decky-loader.enable = true;
}; };
hardware.opengl = { hardware.opengl = {