nixos: move zramswap to base and delete module options

This commit is contained in:
Aly Raffauf 2024-07-07 17:17:51 -04:00
parent 62e400ddeb
commit 094fb25714
5 changed files with 11 additions and 37 deletions

View file

@ -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 = {

View file

@ -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 = {

View file

@ -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;
};
};
}

View file

@ -1,13 +0,0 @@
{
config,
lib,
pkgs,
...
}: {
config = lib.mkIf config.ar.base.zramSwap.enable {
zramSwap = {
enable = true;
memoryPercent = config.ar.base.zramSwap.size;
};
};
}

View file

@ -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;
};
};
};
};
}