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 = [
|
assertions = [
|
||||||
{
|
{
|
||||||
assertion = config.myModules.taffybar.enable != config.myModules.waybar.enable;
|
assertion = !(config.myModules.taffybar.enable && config.myModules.waybar.enable);
|
||||||
message = "Enable exactly one of myModules.taffybar or myModules.waybar.";
|
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 = {
|
services.xserver = {
|
||||||
exportConfiguration = true;
|
exportConfiguration = true;
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
{ config, pkgs, makeEnable, inputs, ... }:
|
{ config, pkgs, makeEnable, inputs, ... }:
|
||||||
makeEnable config "myModules.hyprland" true {
|
makeEnable config "myModules.hyprland" true {
|
||||||
|
myModules.taffybar.enable = true;
|
||||||
|
|
||||||
programs.hyprland = {
|
programs.hyprland = {
|
||||||
enable = true;
|
enable = true;
|
||||||
# Use Hyprland from the flake for proper plugin compatibility
|
# Use Hyprland from the flake for proper plugin compatibility
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
{ config, inputs, pkgs, makeEnable, ... }:
|
{ config, inputs, pkgs, makeEnable, ... }:
|
||||||
makeEnable config "myModules.taffybar" false {
|
makeEnable config "myModules.taffybar" false {
|
||||||
|
myModules.sni.enable = true;
|
||||||
|
|
||||||
nixpkgs.overlays = with inputs; (
|
nixpkgs.overlays = with inputs; (
|
||||||
if builtins.isList taffybar.overlays
|
if builtins.isList taffybar.overlays
|
||||||
then taffybar.overlays
|
then taffybar.overlays
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
{ config, pkgs, inputs, makeEnable, ... }:
|
{ config, pkgs, inputs, makeEnable, ... }:
|
||||||
makeEnable config "myModules.xmonad" true {
|
makeEnable config "myModules.xmonad" true {
|
||||||
|
myModules.taffybar.enable = true;
|
||||||
|
|
||||||
nixpkgs.overlays = with inputs; [
|
nixpkgs.overlays = with inputs; [
|
||||||
xmonad.overlay
|
xmonad.overlay
|
||||||
xmonad-contrib.overlay
|
xmonad-contrib.overlay
|
||||||
|
|||||||
Reference in New Issue
Block a user