diff --git a/configuration.nix b/configuration.nix index ce34680..b8086cd 100644 --- a/configuration.nix +++ b/configuration.nix @@ -7,6 +7,40 @@ ./services.nix ]; + zramSwap = { + enable = true; + memoryPercent = 50; + }; + + fileSystems = { + "/".options = [ + "compress=zstd" + "discard=async" + ]; + "/home".options = [ + "compress=zstd" + "discard=async" + ]; + "/nix".options = [ + "compress=zstd" + "noatime" + "discard=async" + ]; + "/var/lib".options = [ + "compress=zstd" + "noatime" + "discard=async" + ]; + "/swap".options = [ "noatime" ]; + }; + + swapDevices = [ + { + device = "/swap/swapfile"; + size = 8 * 1024; + } + ]; + boot.loader = { systemd-boot = { enable = true; @@ -153,10 +187,5 @@ environment.sessionVariables.NIXOS_OZONE_WL = "1"; - zramSwap = { - enable = true; - memoryPercent = 50; - }; - system.stateVersion = "26.05"; }