diff --git a/Droidnix/README.org b/Droidnix/README.org index d135442b8..2952bfa8a 100644 --- a/Droidnix/README.org +++ b/Droidnix/README.org @@ -1999,16 +1999,23 @@ let wofiConfs = lib.genAttrs (builtins.attrNames wofiFiles) (name: { src = "${wofiAssets}/${name}"; }); + + # Module options + enableWofi = true; # or set to false to disable in { - # Option to enable Wofi - options.enableWofi = lib.mkEnableOption "Enable Wofi terminal launcher"; - - # Config applied when module is enabled - config = lib.mkIf (config.enableWofi) { - # Symbolic references to configuration files - environment.etc."xdg/wofi".source = wofiAssets; - environment.etc."xdg/wofi".files = wofiConfs; + options = { + enableWofi = lib.mkEnableOption "Enable Wofi terminal launcher"; }; + + # Conditional attributes returned directly + wofi = if enableWofi then { + xdg = { + wofi = { + source = wofiAssets; + files = wofiConfs; + }; + }; + } else {}; } #+END_SRC diff --git a/Droidnix/generated/modules/apps/wofi.nix b/Droidnix/generated/modules/apps/wofi.nix index 1eb10ab83..e25d66c17 100644 --- a/Droidnix/generated/modules/apps/wofi.nix +++ b/Droidnix/generated/modules/apps/wofi.nix @@ -8,15 +8,22 @@ let wofiConfs = lib.genAttrs (builtins.attrNames wofiFiles) (name: { src = "${wofiAssets}/${name}"; }); + + # Module options + enableWofi = true; # or set to false to disable in { - # Option to enable Wofi - options.enableWofi = lib.mkEnableOption "Enable Wofi terminal launcher"; - - # Config applied when module is enabled - config = lib.mkIf (config.enableWofi) { - # Symbolic references to configuration files - environment.etc."xdg/wofi".source = wofiAssets; - environment.etc."xdg/wofi".files = wofiConfs; + options = { + enableWofi = lib.mkEnableOption "Enable Wofi terminal launcher"; }; + + # Conditional attributes returned directly + wofi = if enableWofi then { + xdg = { + wofi = { + source = wofiAssets; + files = wofiConfs; + }; + }; + } else {}; }