Working on reshuffling

This commit is contained in:
2026-03-19 07:52:07 +00:00
parent 82295e4ba6
commit c2adceb166
2 changed files with 16 additions and 34 deletions
+8 -17
View File
@@ -1992,28 +1992,19 @@ This is top file of this level which contains just an import statement for all r
{ lib, pkgs, ... }: { lib, pkgs, ... }:
let let
# Relative path to assets # relative path from this module
wofiAssets = ../../../assets/system/conf/wofi; wofiAssets = ../../../assets/system/conf/wofi;
wofiFiles = builtins.readDir wofiAssets;
# Map filenames to source paths
wofiConfs = lib.genAttrs (builtins.attrNames wofiFiles) (name: {
src = "${wofiAssets}/${name}";
});
in in
{ {
# Provide a module option to enable Wofi # Declare an option to enable Wofi
options.enableWofi = options.enableWofi = lib.mkEnableOption "Enable Wofi terminal launcher";
lib.mkEnableOption "Enable Wofi terminal launcher";
# Only apply config if enabled # Apply config if enabled
config = lib.mkIf (lib.getOption "enableWofi") { config = { enableWofi, ... }: lib.mkIf enableWofi {
# Install Wofi system-wide # Install system package
environment.systemPackages = [ environment.systemPackages = [ pkgs.wofi ];
pkgs.wofi
];
# Copy config files to a standard location in /etc/xdg # Copy config files to /etc/xdg/wofi
environment.etc."xdg/wofi".source = wofiAssets; environment.etc."xdg/wofi".source = wofiAssets;
}; };
} }
+8 -17
View File
@@ -1,28 +1,19 @@
{ lib, pkgs, ... }: { lib, pkgs, ... }:
let let
# Relative path to assets # relative path from this module
wofiAssets = ../../../assets/system/conf/wofi; wofiAssets = ../../../assets/system/conf/wofi;
wofiFiles = builtins.readDir wofiAssets;
# Map filenames to source paths
wofiConfs = lib.genAttrs (builtins.attrNames wofiFiles) (name: {
src = "${wofiAssets}/${name}";
});
in in
{ {
# Provide a module option to enable Wofi # Declare an option to enable Wofi
options.enableWofi = options.enableWofi = lib.mkEnableOption "Enable Wofi terminal launcher";
lib.mkEnableOption "Enable Wofi terminal launcher";
# Only apply config if enabled # Apply config if enabled
config = lib.mkIf (lib.getOption "enableWofi") { config = { enableWofi, ... }: lib.mkIf enableWofi {
# Install Wofi system-wide # Install system package
environment.systemPackages = [ environment.systemPackages = [ pkgs.wofi ];
pkgs.wofi
];
# Copy config files to a standard location in /etc/xdg # Copy config files to /etc/xdg/wofi
environment.etc."xdg/wofi".source = wofiAssets; environment.etc."xdg/wofi".source = wofiAssets;
}; };
} }