desktop: no more tmpfs and add swap
This commit is contained in:
parent
b72a3eb24c
commit
a10dfba82d
@ -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 = {
|
||||
|
17
hosts/fix-nfs4-kernel.nix
Normal file
17
hosts/fix-nfs4-kernel.nix
Normal 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=";
|
||||
};
|
||||
}];
|
||||
}
|
Loading…
Reference in New Issue
Block a user