diff --git a/hosts/mauville/default.nix b/hosts/mauville/default.nix index f6dd9136..a74ad237 100644 --- a/hosts/mauville/default.nix +++ b/hosts/mauville/default.nix @@ -83,6 +83,8 @@ in { system.stateVersion = "23.11"; + zramSwap.memoryPercent = 100; + ar = { apps = { firefox.enable = true; @@ -92,10 +94,7 @@ in { virt-manager.enable = true; }; - base = { - enable = true; - zramSwap.size = 100; - }; + base.enable = true; desktop = { greetd = { diff --git a/hosts/rustboro/default.nix b/hosts/rustboro/default.nix index 0493ce0a..c58842e8 100644 --- a/hosts/rustboro/default.nix +++ b/hosts/rustboro/default.nix @@ -22,13 +22,11 @@ system.stateVersion = "24.05"; + zramSwap.memoryPercent = 100; + ar = { apps.firefox.enable = true; - - base = { - enable = true; - zramSwap.size = 100; - }; + base.enable = true; desktop = { greetd = { diff --git a/nixosModules/base/default.nix b/nixosModules/base/default.nix index e910645f..fde4bf05 100644 --- a/nixosModules/base/default.nix +++ b/nixosModules/base/default.nix @@ -10,7 +10,6 @@ ./nix ./nixpkgs ./plymouth - ./zramSwap ]; config = lib.mkIf config.ar.base.enable { @@ -70,5 +69,10 @@ }; time.timeZone = "America/New_York"; + + zramSwap = { + enable = lib.mkDefault true; + memoryPercent = lib.mkDefault 50; + }; }; } diff --git a/nixosModules/base/zramSwap/default.nix b/nixosModules/base/zramSwap/default.nix deleted file mode 100644 index 2cb643af..00000000 --- a/nixosModules/base/zramSwap/default.nix +++ /dev/null @@ -1,13 +0,0 @@ -{ - config, - lib, - pkgs, - ... -}: { - config = lib.mkIf config.ar.base.zramSwap.enable { - zramSwap = { - enable = true; - memoryPercent = config.ar.base.zramSwap.size; - }; - }; -} diff --git a/nixosModules/options.nix b/nixosModules/options.nix index fa2a83c4..50caf760 100644 --- a/nixosModules/options.nix +++ b/nixosModules/options.nix @@ -93,20 +93,6 @@ default = config.ar.base.enable; type = lib.types.bool; }; - - zramSwap = { - enable = lib.mkOption { - description = "zram swap."; - default = config.ar.base.enable; - type = lib.types.bool; - }; - - size = lib.mkOption { - description = "zram swap size relative to RAM."; - default = 50; - type = lib.types.int; - }; - }; }; }; }