Regenerated
This commit is contained in:
@@ -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
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user