aboutsummaryrefslogtreecommitdiffstats
path: root/modules/system/btop/assertions.nix
diff options
context:
space:
mode:
Diffstat (limited to 'modules/system/btop/assertions.nix')
-rw-r--r--modules/system/btop/assertions.nix7
1 files changed, 5 insertions, 2 deletions
diff --git a/modules/system/btop/assertions.nix b/modules/system/btop/assertions.nix
index 82cddc3..8ac7ccb 100644
--- a/modules/system/btop/assertions.nix
+++ b/modules/system/btop/assertions.nix
@@ -1,13 +1,16 @@
# Validates btop sub-options require the main module to be enabled
{ config, ... }:
+let
+ cfg = config.system.btop;
+in
{
assertions = [
{
- assertion = !config.system.btop.nvidia.enable || config.system.btop.enable;
+ assertion = !cfg.nvidia.enable || cfg.enable;
message = "system.btop.nvidia.enable requires system.btop.enable.";
}
{
- assertion = !config.system.btop.amd.enable || config.system.btop.enable;
+ assertion = !cfg.amd.enable || cfg.enable;
message = "system.btop.amd.enable requires system.btop.enable.";
}
];