diff options
| author | adikro <adikro@disroot.org> | 2025-12-22 04:29:04 +0100 |
|---|---|---|
| committer | adikro <adikro@disroot.org> | 2025-12-22 04:29:04 +0100 |
| commit | 49bf16698295cd068e125333ec2f7c7bfa6bda27 (patch) | |
| tree | ae3b8bf11cdffb6f02e3f52a1b757afd524251ec /sys/core/memory.nix | |
| parent | 8d1e42316948a6665911ae60d796161ee20e0b54 (diff) | |
fixed the memory management module
Diffstat (limited to 'sys/core/memory.nix')
| -rw-r--r-- | sys/core/memory.nix | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/sys/core/memory.nix b/sys/core/memory.nix index cdf71e8..956cc73 100644 --- a/sys/core/memory.nix +++ b/sys/core/memory.nix @@ -4,14 +4,11 @@ let in { options.sys.core.memory = { - enable = lib.mkEnableOption "memory management"; - zram = { enable = lib.mkEnableOption "enables zram compression"; percent = lib.mkOption { type = lib.types.int; default = 25; - description = "Percentage of total RAM to use for zram"; }; }; @@ -19,13 +16,11 @@ in enable = lib.mkEnableOption "enables a swapfile"; size = lib.mkOption { type = lib.types.int; - default = 8192; - description = "Size of the swapfile in gigabytes"; + default = 8; }; }; }; - - config = lib.mkIf cfg.enable (lib.mkMerge [ + config = lib.mkMerge [ (lib.mkIf cfg.zram.enable { zramSwap = { enable = true; @@ -38,9 +33,9 @@ in (lib.mkIf cfg.swapfile.enable { swapDevices = [ { device = "/.swapvol/swapfile"; - size = cfg.swapfile.size * 1024; + size = cfg.swapfile.size * 1024; priority = 0; } ]; }) - ]); + ]; } |
