add systemConfig.zramSwap.size option and set new defaults

This commit is contained in:
Aly Raffauf 2024-03-30 21:14:13 -04:00
parent ec66205035
commit 178c2e8c11
5 changed files with 20 additions and 5 deletions

View file

@ -28,7 +28,9 @@
systemConfig = {
plymouth.enable = true;
zramSwap.enable = true;
zramSwap = {
enable = true;
};
};
desktopConfig = {

View file

@ -27,7 +27,10 @@
};
systemConfig = {
zramSwap.enable = true;
zramSwap = {
enable = true;
size = 100;
};
};
homeLab.enable = true;

View file

@ -83,7 +83,9 @@ in {
systemConfig = {
plymouth.enable = true;
zramSwap.enable = true;
zramSwap = {
enable = true;
};
};
apps = {

View file

@ -19,7 +19,10 @@
systemConfig = {
plymouth.enable = true;
zramSwap.enable = true;
zramSwap = {
enable = true;
size = 100;
};
};
desktopConfig = {

View file

@ -2,12 +2,17 @@
options = {
systemConfig.zramSwap.enable = lib.mkEnableOption "Enables zram swap.";
systemConfig.zramSwap.size = lib.mkOption {
description = "Percent size of the zram swap.";
default = 50;
type = lib.types.int;
};
};
config = lib.mkIf config.systemConfig.zramSwap.enable {
zramSwap = {
enable = true;
memoryPercent = 25;
memoryPercent = config.systemConfig.zramSwap.size;
};
};
}