assertions
This commit is contained in:
@@ -104,6 +104,21 @@ in
|
||||
{
|
||||
imports = [ ./options.nix ];
|
||||
config = lib.mkIf cfg.enable {
|
||||
assertions = [
|
||||
{
|
||||
assertion = cfg.rootDisk != "";
|
||||
message = "mjallen.hardware.disko.rootDisk must be set to a non-empty device path (e.g. \"/dev/nvme0n1\").";
|
||||
}
|
||||
{
|
||||
assertion = !(cfg.enableSwap && cfg.swapSize == "");
|
||||
message = "mjallen.hardware.disko.swapSize must be a non-empty size string when enableSwap is true (e.g. \"16G\").";
|
||||
}
|
||||
{
|
||||
assertion = cfg.compression != "";
|
||||
message = "mjallen.hardware.disko.compression must be a non-empty compression type (e.g. \"zstd\").";
|
||||
}
|
||||
];
|
||||
|
||||
disko.devices = lib.mkMerge [
|
||||
{
|
||||
nodev."/" = {
|
||||
|
||||
Reference in New Issue
Block a user