Move zram configuration
This commit is contained in:
parent
9568e39d2c
commit
1265131377
6 changed files with 7 additions and 25 deletions
|
@ -19,10 +19,6 @@
|
||||||
];
|
];
|
||||||
|
|
||||||
features = {
|
features = {
|
||||||
core = {
|
|
||||||
zram.enable = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
desktop.media.makemkv.enable = true;
|
desktop.media.makemkv.enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -28,7 +28,6 @@
|
||||||
|
|
||||||
core = {
|
core = {
|
||||||
pipewire.enable = true;
|
pipewire.enable = true;
|
||||||
zram.enable = true;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
desktop = {
|
desktop = {
|
||||||
|
|
|
@ -16,7 +16,6 @@
|
||||||
];
|
];
|
||||||
|
|
||||||
features = {
|
features = {
|
||||||
core.zram.enable = true;
|
|
||||||
desktop.dconf.enable = true;
|
desktop.dconf.enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -12,6 +12,5 @@
|
||||||
./pipewire.nix
|
./pipewire.nix
|
||||||
./podman.nix
|
./podman.nix
|
||||||
./st.nix
|
./st.nix
|
||||||
./zram.nix
|
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,18 +0,0 @@
|
||||||
{ config, lib, ... }:
|
|
||||||
|
|
||||||
with lib;
|
|
||||||
|
|
||||||
let
|
|
||||||
cfg = config.features.core.zram;
|
|
||||||
in
|
|
||||||
{
|
|
||||||
options.features.core.zram.enable = mkEnableOption "Enable zram";
|
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
|
||||||
zramSwap = {
|
|
||||||
enable = true;
|
|
||||||
algorithm = "zstd";
|
|
||||||
memoryPercent = 90;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
7
modules2/zram.nix
Normal file
7
modules2/zram.nix
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
{
|
||||||
|
flake.modules.nixos.pc.zramSwap = {
|
||||||
|
enable = true;
|
||||||
|
algorithm = "zstd";
|
||||||
|
memoryPercent = 90;
|
||||||
|
};
|
||||||
|
}
|
Loading…
Add table
Add a link
Reference in a new issue