Regenerated

This commit is contained in:
2026-03-27 14:15:36 +00:00
parent ccbcce2e3c
commit 7d3ee34f74
3 changed files with 336 additions and 372 deletions
@@ -3,23 +3,7 @@
let
programName = "wofi";
username = config.defaultUser or "henrov";
assetPath = "${flakeRoot}/generated/.config/${programName}";
# Read all files in the asset directory if it exists
assetFiles =
if builtins.pathExists assetPath then
builtins.attrNames (builtins.readDir assetPath)
else
[];
# Convert files to Home Manager xdg config entries
wofiFiles = lib.genAttrs assetFiles (f: {
name =
if f == "wofi.conf" then ".config/wofi/config"
else if f == "theming.css" then ".config/wofi/style.css"
else ".config/wofi/${f}";
value = { source = "${assetPath}/${f}"; };
});
assetPath = "${flakeRoot}/generated/.config/wofi";
in
{
# Install Wofi via system packages
@@ -27,13 +11,17 @@ in
pkgs.wofi
];
# Home Manager configuration
_module.args.hmUsers = {
home-manager.users = {
${username} = {
home.packages = [ pkgs.wofi ];
# Deploy all files to ~/.config/wofi/
home.file = lib.mkMerge wofiFiles;
home.file = {
".config/wofi/config" = {
source = "${assetPath}/config";
force = true; # <-- allow overwrite
};
".config/wofi/style.css" = {
source = "${assetPath}/style.css";
force = true; # <-- allow overwrite
};
};
};
};
}