desktop: no more tmpfs and add swap

This commit is contained in:
2023-09-22 19:22:19 +02:00
parent b72a3eb24c
commit a10dfba82d
2 changed files with 26 additions and 2 deletions

View File

@@ -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 = {
@@ -82,6 +83,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";
@@ -106,7 +113,7 @@
};
swapDevices = [ ];
swapDevices = [ { device = "/swap/swapfile"; } ];
networking = {
vswitches = {