aboutsummaryrefslogtreecommitdiffstats
path: root/modules/system/btop
diff options
context:
space:
mode:
authorArpit Chakladar <arpitchakladar@gmail.com>2026-09-24 19:16:14 +0530
committerArpit Chakladar <arpitchakladar@gmail.com>2026-09-24 19:16:14 +0530
commitf36491c92269d3e1dd241e67c292af762ac498c3 (patch)
tree7e36c45915bf83dc7b69e21830cf0c27397c0592 /modules/system/btop
parentf85b86095aa4ea6ac4921b6d37981bffa5c0b711 (diff)
downloadhome-manager-config-f36491c92269d3e1dd241e67c292af762ac498c3.tar.gz
home-manager-config-f36491c92269d3e1dd241e67c292af762ac498c3.zip
refactor: some more minor refactoring
Diffstat (limited to 'modules/system/btop')
-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.";
}
];