Allow overriding partitioning scripts
This commit is contained in:
parent
1ae28ff60e
commit
d4cafbf594
|
@ -64,7 +64,6 @@
|
||||||
script = mkOption {
|
script = mkOption {
|
||||||
type = types.str;
|
type = types.str;
|
||||||
description = "The script for formatting the disk.";
|
description = "The script for formatting the disk.";
|
||||||
internal = true;
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -195,7 +194,7 @@
|
||||||
'' else ""}
|
'' else ""}
|
||||||
'';
|
'';
|
||||||
|
|
||||||
script = ''
|
script = lib.mkDefault ''
|
||||||
function partition() {
|
function partition() {
|
||||||
${if (!config.wipe) then cleanup else ""}
|
${if (!config.wipe) then cleanup else ""}
|
||||||
|
|
||||||
|
@ -306,9 +305,8 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
script = mkOption {
|
script = mkOption {
|
||||||
type = types.lines;
|
type = types.str;
|
||||||
description = "The script for partitioning the system's disks.";
|
description = "The script for partitioning the system's disks.";
|
||||||
internal = true;
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -317,7 +315,7 @@
|
||||||
config = {
|
config = {
|
||||||
valhalla = {
|
valhalla = {
|
||||||
partition = {
|
partition = {
|
||||||
script =
|
script = lib.mkDefault (
|
||||||
let
|
let
|
||||||
cfg = config.valhalla.partition;
|
cfg = config.valhalla.partition;
|
||||||
inherit (cfg) os rootDir;
|
inherit (cfg) os rootDir;
|
||||||
|
@ -363,7 +361,7 @@
|
||||||
mountScript
|
mountScript
|
||||||
swapScript
|
swapScript
|
||||||
]
|
]
|
||||||
);
|
));
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue