From fb8df6e2420b54c33914ef944cb523346edfd15c Mon Sep 17 00:00:00 2001 From: Ivan Malison Date: Tue, 10 Feb 2026 20:17:46 -0800 Subject: [PATCH] feat: propagate module enables (hyprland/xmonad -> taffybar -> sni) Move enable propagation into the modules themselves instead of desktop.nix. Relax the assertion to only prevent both taffybar and waybar from being enabled simultaneously. Co-Authored-By: Claude Opus 4.6 --- nixos/desktop.nix | 7 ++----- nixos/hyprland.nix | 2 ++ nixos/taffybar.nix | 2 ++ nixos/xmonad.nix | 2 ++ 4 files changed, 8 insertions(+), 5 deletions(-) diff --git a/nixos/desktop.nix b/nixos/desktop.nix index b972413b..011b3ac1 100644 --- a/nixos/desktop.nix +++ b/nixos/desktop.nix @@ -10,14 +10,11 @@ makeEnable config "myModules.desktop" true { assertions = [ { - assertion = config.myModules.taffybar.enable != config.myModules.waybar.enable; - message = "Enable exactly one of myModules.taffybar or myModules.waybar."; + assertion = !(config.myModules.taffybar.enable && config.myModules.waybar.enable); + message = "myModules.taffybar and myModules.waybar cannot both be enabled."; } ]; - myModules.taffybar.enable = lib.mkDefault config.myModules.xmonad.enable; - myModules.waybar.enable = lib.mkDefault (!config.myModules.xmonad.enable); - services.xserver = { exportConfiguration = true; enable = true; diff --git a/nixos/hyprland.nix b/nixos/hyprland.nix index a14465e9..bf6dbbf2 100644 --- a/nixos/hyprland.nix +++ b/nixos/hyprland.nix @@ -1,5 +1,7 @@ { config, pkgs, makeEnable, inputs, ... }: makeEnable config "myModules.hyprland" true { + myModules.taffybar.enable = true; + programs.hyprland = { enable = true; # Use Hyprland from the flake for proper plugin compatibility diff --git a/nixos/taffybar.nix b/nixos/taffybar.nix index 08ccf4be..85cd69ec 100644 --- a/nixos/taffybar.nix +++ b/nixos/taffybar.nix @@ -1,5 +1,7 @@ { config, inputs, pkgs, makeEnable, ... }: makeEnable config "myModules.taffybar" false { + myModules.sni.enable = true; + nixpkgs.overlays = with inputs; ( if builtins.isList taffybar.overlays then taffybar.overlays diff --git a/nixos/xmonad.nix b/nixos/xmonad.nix index 877c061a..32b6a4d1 100644 --- a/nixos/xmonad.nix +++ b/nixos/xmonad.nix @@ -1,5 +1,7 @@ { config, pkgs, inputs, makeEnable, ... }: makeEnable config "myModules.xmonad" true { + myModules.taffybar.enable = true; + nixpkgs.overlays = with inputs; [ xmonad.overlay xmonad-contrib.overlay