From 80c5d4a2562fbc803afb0208cc16a261a032ceb2 Mon Sep 17 00:00:00 2001 From: TheWanderingCrow Date: Wed, 22 Oct 2025 15:28:56 -0400 Subject: [PATCH] Add impermanence to hostSpec --- modules/common/host-spec.nix | 29 +++++++++++++++++------------ 1 file changed, 17 insertions(+), 12 deletions(-) diff --git a/modules/common/host-spec.nix b/modules/common/host-spec.nix index c64cc59..c303dc3 100644 --- a/modules/common/host-spec.nix +++ b/modules/common/host-spec.nix @@ -89,18 +89,23 @@ default = false; description = "Used to indicate a virtual host"; }; + isImpermanent = lib.mkOption { + type = lib.types.bool; + default = false; + description = "Used to indicate an impermanent host"; + }; }; - config = { - assertions = let - # We import these options to HM and NixOS, so need to not fail on HM - isImpermanent = - config ? "system" && config.system ? "impermanence" && config.system.impermanence.enable; - in [ - { - assertion = !isImpermanent || (isImpermanent && !("${config.hostSpec.persistFolder}" == "")); - message = "config.system.impermanence.enable is true but no persistFolder path is provided"; - } - ]; - }; + #config = { + # assertions = let + # # We import these options to HM and NixOS, so need to not fail on HM + # isImpermanent = + # config ? "system" && config.system ? "impermanence" && config.system.impermanence.enable; + # in [ + # { + # assertion = !isImpermanent || (isImpermanent && !("${config.hostSpec.persistFolder}" == "")); + # message = "config.system.impermanence.enable is true but no persistFolder path is provided"; + # } + # ]; + #}; }