diff --git a/nixos/boot.nix b/nixos/boot.nix index 8dcc125c..c7af2aa9 100644 --- a/nixos/boot.nix +++ b/nixos/boot.nix @@ -4,7 +4,6 @@ boot = { kernel.sysctl = { - "vm.swappiness" = 1; "max_user_watches" = 524288; "kernel.dmesg_restrict" = true; "kernel.unprivileged_bpf_disabled" = true; diff --git a/nixos/boxes/foureighty/configuration.nix b/nixos/boxes/foureighty/configuration.nix index 750eabfa..14acb9f1 100644 --- a/nixos/boxes/foureighty/configuration.nix +++ b/nixos/boxes/foureighty/configuration.nix @@ -24,13 +24,17 @@ time.timeZone = "Europe/London"; hardware.trackpoint.enable = true; + zramSwap = { + enable = true; + algorithm = "zstd"; + }; services.hardware.bolt.enable = true; services.fprintd = { enable = true; }; imports = [ - /etc/nixos/hardware-configuration.nix + ./hardware-configuration.nix ../../boot.nix ../../common.nix ../../gfx-nvidia-optimus.nix diff --git a/nixos/boxes/foureighty/hardware-configuration.nix b/nixos/boxes/foureighty/hardware-configuration.nix new file mode 100644 index 00000000..4d3dba46 --- /dev/null +++ b/nixos/boxes/foureighty/hardware-configuration.nix @@ -0,0 +1,22 @@ +{ config, lib, pkgs, ... }: + +{ + imports = [ ]; + + boot.initrd.availableKernelModules = [ "xhci_pci" "nvme" "usbhid" "usb_storage" "sd_mod" ]; + boot.initrd.kernelModules = [ "dm-snapshot" ]; + boot.kernelModules = [ "kvm-intel" ]; + boot.extraModulePackages = [ ]; + + boot.kernel.sysctl = { + "vm.swappiness" = 50; + }; + + fileSystems."/" = { device = "/dev/disk/by-uuid/7ae9348d-604e-4196-a27b-24a7495438c3"; fsType = "ext4"; }; + + fileSystems."/boot" = { device = "/dev/disk/by-uuid/C4DD-2374"; fsType = "vfat"; }; + + swapDevices = [ ]; + + nix.maxJobs = lib.mkDefault 8; +}