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=
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
{ config, pkgs, lib, ... }:
{ lib, ... }:
let
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
{
# Option to enable Wofi
options.enableWofi = lib.mkEnableOption "Enable Wofi terminal launcher";
# Config applied when module is evaluated
config = {
# Add Wofi to systemPackages if enabled
environment.systemPackages = lib.mkIf (config.enableWofi) [ pkgs.wofi ];
# Install wofi config files
environment.etc."xdg/wofi".source = lib.mkIf (config.enableWofi) wofiAssets;
# 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;
};
}
#+END_SRC