Working on reshuffling

This commit is contained in:
2026-03-19 07:58:15 +00:00
parent 541c14c3d1
commit 6277dc4b3a
2 changed files with 24 additions and 16 deletions
+12 -8
View File
@@ -1989,22 +1989,26 @@ the top of the file."
** =generated/modules/apps/wofi.nix= ** =generated/modules/apps/wofi.nix=
This is top file of this level which contains just an import statement for all relevant files and/or the subfolder in this folder This is top file of this level which contains just an import statement for all relevant files and/or the subfolder in this folder
#+BEGIN_SRC nix :tangle generated/modules/apps/wofi.nix :noweb tangle :mkdirp yes :eval never-html #+BEGIN_SRC nix :tangle generated/modules/apps/wofi.nix :noweb tangle :mkdirp yes :eval never-html
{ config, pkgs, lib, ... }: { lib, ... }:
let let
wofiAssets = ../../../assets/system/conf/wofi; wofiAssets = ../../../assets/system/conf/wofi;
wofiFiles = builtins.readDir wofiAssets;
# Generate attribute set of files
wofiConfs = lib.genAttrs (builtins.attrNames wofiFiles) (name: {
src = "${wofiAssets}/${name}";
});
in in
{ {
# Option to enable Wofi # Option to enable Wofi
options.enableWofi = lib.mkEnableOption "Enable Wofi terminal launcher"; options.enableWofi = lib.mkEnableOption "Enable Wofi terminal launcher";
# Config applied when module is evaluated # Config applied when module is enabled
config = { config = lib.mkIf (config.enableWofi) {
# Add Wofi to systemPackages if enabled # Symbolic references to configuration files
environment.systemPackages = lib.mkIf (config.enableWofi) [ pkgs.wofi ]; environment.etc."xdg/wofi".source = wofiAssets;
environment.etc."xdg/wofi".files = wofiConfs;
# Install wofi config files
environment.etc."xdg/wofi".source = lib.mkIf (config.enableWofi) wofiAssets;
}; };
} }
#+END_SRC #+END_SRC
+12 -8
View File
@@ -1,18 +1,22 @@
{ config, pkgs, lib, ... }: { lib, ... }:
let let
wofiAssets = ../../../assets/system/conf/wofi; wofiAssets = ../../../assets/system/conf/wofi;
wofiFiles = builtins.readDir wofiAssets;
# Generate attribute set of files
wofiConfs = lib.genAttrs (builtins.attrNames wofiFiles) (name: {
src = "${wofiAssets}/${name}";
});
in in
{ {
# Option to enable Wofi # Option to enable Wofi
options.enableWofi = lib.mkEnableOption "Enable Wofi terminal launcher"; options.enableWofi = lib.mkEnableOption "Enable Wofi terminal launcher";
# Config applied when module is evaluated # Config applied when module is enabled
config = { config = lib.mkIf (config.enableWofi) {
# Add Wofi to systemPackages if enabled # Symbolic references to configuration files
environment.systemPackages = lib.mkIf (config.enableWofi) [ pkgs.wofi ]; environment.etc."xdg/wofi".source = wofiAssets;
environment.etc."xdg/wofi".files = wofiConfs;
# Install wofi config files
environment.etc."xdg/wofi".source = lib.mkIf (config.enableWofi) wofiAssets;
}; };
} }