Fixes + Update

This commit is contained in:
Aleksandr Lebedev 2025-09-17 23:33:10 +02:00
parent ba8ee5e161
commit fb0d8526ff
4 changed files with 99 additions and 56 deletions

View file

@ -18,7 +18,7 @@ in {
options.${namespace}.presets.disko.impermanenceBtrfsLuks = with types; {
enable = mkBoolOpt false "Enable preset";
device = mkOpt' str "/dev/nvme0n1";
swapSize = mkOpt' int 32;
swapSize = mkOpt' (nullOr int) 32;
};
config = mkIf cfg.enable {
@ -77,7 +77,7 @@ in {
mountpoint = "/persist";
mountOptions = ["subvol=persist" "compress=zstd" "noatime"];
};
"/swap" = {
"/swap" = mkIf (cfg.swapSize != null) {
mountpoint = "/swap";
swap.swapfile.size = "${builtins.toString cfg.swapSize}G";
};