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
@@ -1,28 +1,19 @@
{ lib, pkgs, ... }:
let
# Relative path to assets
# relative path from this module
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
{
# Provide a module option to enable Wofi
options.enableWofi =
lib.mkEnableOption "Enable Wofi terminal launcher";
# Declare an option to enable Wofi
options.enableWofi = lib.mkEnableOption "Enable Wofi terminal launcher";
# Only apply config if enabled
config = lib.mkIf (lib.getOption "enableWofi") {
# Install Wofi system-wide
environment.systemPackages = [
pkgs.wofi
];
# Apply config if enabled
config = { enableWofi, ... }: lib.mkIf enableWofi {
# Install system package
environment.systemPackages = [ 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;
};
}