Allow overriding partitioning scripts

This commit is contained in:
Manuel Thalmann 2024-07-11 20:41:47 +02:00
parent feb95ee825
commit 212becef76

View file

@ -64,7 +64,6 @@
script = mkOption {
type = types.str;
description = "The script for formatting the disk.";
internal = true;
};
};
@ -195,7 +194,7 @@
'' else ""}
'';
script = ''
script = lib.mkDefault ''
function partition() {
${if (!config.wipe) then cleanup else ""}
@ -306,9 +305,8 @@
};
script = mkOption {
type = types.lines;
type = types.str;
description = "The script for partitioning the system's disks.";
internal = true;
};
};
};
@ -317,7 +315,7 @@
config = {
valhalla = {
partition = {
script =
script = lib.mkDefault (
let
cfg = config.valhalla.partition;
inherit (cfg) os rootDir;
@ -363,7 +361,7 @@
mountScript
swapScript
]
);
));
};
};
};