diff --git a/nixos/stolas/default.nix b/nixos/stolas/default.nix index 9ae2d23..696f55f 100644 --- a/nixos/stolas/default.nix +++ b/nixos/stolas/default.nix @@ -23,14 +23,7 @@ pkiBundle = "/var/lib/sbctl"; }; kernelModules = [ "kvm-amd" ]; - # Hopefully fixes suspend issues with wifi card - kernelPackages = pkgs.linuxPackages_latest; - kernelParams = [ - "resume=UUID=81dfbfa5-d578-479c-b11c-3ee5abd6848a" - "resume_offset=79859524" - "zswap.enabled=1" - ]; - extraModulePackages = [ config.boot.kernelPackages.v4l2loopback ]; + extraModulePackages = [ pkgs.linuxPackages.v4l2loopback ]; # Lanzaboote currently replaces the systemd-boot module. # This setting is usually set to true in configuration.nix # generated at installation time. So we force it to false @@ -72,6 +65,10 @@ powerManagement = { enable = true; cpuFreqGovernor = "schedutil"; + # TODO: Limit charge of battery, does this work without kernel patches from hardware.frameworkenableKmod? + powerUpCommands = '' + echo 80 > /sys/class/power_supply/BAT0/charge_control_stop_threshold + ''; }; networking = { @@ -177,6 +174,10 @@ "dbus-org.freedesktop.ModemManager1".enable = lib.mkForce false; }; + systemd.sleep.extraConfig = '' + HibernateDelaySec=1h + ''; + systemd.tmpfiles.rules = [ "v /var/.snapshots 0755 root root - -" "v /var/paperless/.snapshots 0755 root root - -" @@ -204,7 +205,20 @@ "wireshark" "paperless" ]; + shell = "/run/current-system/sw/bin/zsh"; }; }; }; + + # TODO + # age.secrets = { + # paperless = { + # file = "${config.dadada.secrets.path}/paperless.age"; + # mode = "700"; + # owner = "paperless"; + # }; + # }; + + # Create compressing swap space in RAM + zramSwap.enable = true; } diff --git a/nixos/stolas/disks.nix b/nixos/stolas/disks.nix index eff5680..01cf635 100644 --- a/nixos/stolas/disks.nix +++ b/nixos/stolas/disks.nix @@ -86,7 +86,7 @@ }; "/swap" = { mountpoint = "/.swapvol"; - swap.swapfile.size = "128G"; + swap.swapfile.size = "64G"; }; }; };