Compare commits

...

2 Commits

Author SHA1 Message Date
afd2b6a63d
desktop: update StateVersion 2023-09-22 19:22:54 +02:00
a10dfba82d
desktop: no more tmpfs and add swap 2023-09-22 19:22:19 +02:00
4 changed files with 28 additions and 4 deletions

View File

@ -195,6 +195,6 @@
# enable = true; # enable = true;
# channel = "https://nixos.org/channels/nixos-unstable"; # channel = "https://nixos.org/channels/nixos-unstable";
# }; # };
stateVersion = "22.05"; stateVersion = "23.05";
}; };
} }

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

17
hosts/fix-nfs4-kernel.nix Normal file
View File

@ -0,0 +1,17 @@
{ lib, config, pkgs, ... }:
# NFSv4 fix for 6.5.3 and 6.1.53, remove asap
let
version = config.boot.kernelPackages.kernel.version;
badVersions = [ "6.5.3" "6.1.53" ];
in
lib.mkIf (lib.any (v: v == version) badVersions) {
boot.kernelPatches = [{
name = "nfs4-patch";
patch = pkgs.fetchpatch {
url = "https://patchwork.kernel.org/project/selinux/patch/20230911142358.883728-1-omosnace@redhat.com/raw/";
hash = "sha256-m947t39xr4VqJBZ2mYTFq9Up/NWlwueH8aXFZRQwA7c=";
};
}];
}

View File

@ -103,7 +103,7 @@
size = 16; size = 16;
gtk.enable = true; gtk.enable = true;
}; };
stateVersion = "22.05"; stateVersion = "23.05";
}; };
programs = { programs = {