From edade19d64cd07c2d53f87d4c3c19768d8201e29 Mon Sep 17 00:00:00 2001 From: ItsDrike Date: Tue, 16 Apr 2024 12:29:22 +0200 Subject: [PATCH] Add assertion to prevent enabling autoWipBtrfs without impermanence --- options/system/impermanence.nix | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/options/system/impermanence.nix b/options/system/impermanence.nix index fece564..732f5da 100644 --- a/options/system/impermanence.nix +++ b/options/system/impermanence.nix @@ -85,4 +85,13 @@ in }; }; }; + + config = { + assertions = [ + { + assertion = cfg.autoWipeBtrfs.enable -> cfg.root.enable; + message = "myOptions.system.impermanence.autoWipeBtrfs requires myOptions.system.impermanence.root to be enabled."; + } + ]; + }; }