mirror of
https://github.com/TheWanderingCrow/CrOS.git
synced 2026-01-11 01:34:08 -05:00
Add impermanence to hostSpec
This commit is contained in:
parent
0fbc69679e
commit
80c5d4a256
1 changed files with 17 additions and 12 deletions
|
|
@ -89,18 +89,23 @@
|
||||||
default = false;
|
default = false;
|
||||||
description = "Used to indicate a virtual host";
|
description = "Used to indicate a virtual host";
|
||||||
};
|
};
|
||||||
|
isImpermanent = lib.mkOption {
|
||||||
|
type = lib.types.bool;
|
||||||
|
default = false;
|
||||||
|
description = "Used to indicate an impermanent host";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
config = {
|
#config = {
|
||||||
assertions = let
|
# assertions = let
|
||||||
# We import these options to HM and NixOS, so need to not fail on HM
|
# # We import these options to HM and NixOS, so need to not fail on HM
|
||||||
isImpermanent =
|
# isImpermanent =
|
||||||
config ? "system" && config.system ? "impermanence" && config.system.impermanence.enable;
|
# config ? "system" && config.system ? "impermanence" && config.system.impermanence.enable;
|
||||||
in [
|
# in [
|
||||||
{
|
# {
|
||||||
assertion = !isImpermanent || (isImpermanent && !("${config.hostSpec.persistFolder}" == ""));
|
# assertion = !isImpermanent || (isImpermanent && !("${config.hostSpec.persistFolder}" == ""));
|
||||||
message = "config.system.impermanence.enable is true but no persistFolder path is provided";
|
# message = "config.system.impermanence.enable is true but no persistFolder path is provided";
|
||||||
}
|
# }
|
||||||
];
|
# ];
|
||||||
};
|
#};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue