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 <noreply@anthropic.com>
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user