mirror of
https://git.sr.ht/~neverness/ultima
synced 2025-01-08 17:23:53 +00:00
24 lines
361 B
Nix
24 lines
361 B
Nix
{ x, lib, config, ... }:
|
|
|
|
with lib;
|
|
with x;
|
|
let cfg = config.module.services.zram;
|
|
in {
|
|
options = {
|
|
module.services.zram = {
|
|
enable = mkBool;
|
|
algo = mkOpt.str;
|
|
};
|
|
};
|
|
|
|
config = mkIf cfg.enable {
|
|
zramSwap = True // {
|
|
priority = 1000;
|
|
algorithm = cfg.algo;
|
|
swapDevices = 1;
|
|
memoryPercent = 100;
|
|
};
|
|
};
|
|
}
|
|
|