Working on reshuffling

This commit is contained in:
2026-03-19 08:01:14 +00:00
parent 198899dc82
commit 87c2dc196d
2 changed files with 20 additions and 30 deletions
+10 -15
View File
@@ -1994,28 +1994,23 @@ This is top file of this level which contains just an import statement for all r
let let
wofiAssets = ../../../assets/system/conf/wofi; wofiAssets = ../../../assets/system/conf/wofi;
wofiFiles = builtins.readDir wofiAssets; wofiFiles = builtins.readDir wofiAssets;
# Generate attribute set of files
wofiConfs = lib.genAttrs (builtins.attrNames wofiFiles) (name: { wofiConfs = lib.genAttrs (builtins.attrNames wofiFiles) (name: {
src = "${wofiAssets}/${name}"; src = "${wofiAssets}/${name}";
}); });
# Module options enableWofi = true; # toggle on/off
enableWofi = true; # or set to false to disable
in in
{ {
options = { options.enableWofi = lib.mkEnableOption "Enable Wofi terminal launcher";
enableWofi = lib.mkEnableOption "Enable Wofi terminal launcher";
};
# Conditional attributes returned directly # Everything is wrapped safely in config
wofi = if enableWofi then { config = lib.mkIf enableWofi {
xdg = { # Just symbolic references to files, no pkgs or recursive config
wofi = { programs.wofi = {
source = wofiAssets; enable = true;
files = wofiConfs; assetsDir = wofiAssets;
}; files = wofiConfs;
}; };
} else {}; };
} }
#+END_SRC #+END_SRC
+10 -15
View File
@@ -3,27 +3,22 @@
let let
wofiAssets = ../../../assets/system/conf/wofi; wofiAssets = ../../../assets/system/conf/wofi;
wofiFiles = builtins.readDir wofiAssets; wofiFiles = builtins.readDir wofiAssets;
# Generate attribute set of files
wofiConfs = lib.genAttrs (builtins.attrNames wofiFiles) (name: { wofiConfs = lib.genAttrs (builtins.attrNames wofiFiles) (name: {
src = "${wofiAssets}/${name}"; src = "${wofiAssets}/${name}";
}); });
# Module options enableWofi = true; # toggle on/off
enableWofi = true; # or set to false to disable
in in
{ {
options = { options.enableWofi = lib.mkEnableOption "Enable Wofi terminal launcher";
enableWofi = lib.mkEnableOption "Enable Wofi terminal launcher";
};
# Conditional attributes returned directly # Everything is wrapped safely in config
wofi = if enableWofi then { config = lib.mkIf enableWofi {
xdg = { # Just symbolic references to files, no pkgs or recursive config
wofi = { programs.wofi = {
source = wofiAssets; enable = true;
files = wofiConfs; assetsDir = wofiAssets;
}; files = wofiConfs;
}; };
} else {}; };
} }