36 lines
897 B
Nix
36 lines
897 B
Nix
{ lib, config, pkgs, flakeRoot, home-manager, ... }:
|
|
|
|
let
|
|
programName = "wofi";
|
|
username = config.defaultUser or "henrov";
|
|
assetPath = "${flakeRoot}/generated/.config/wofi";
|
|
in
|
|
{
|
|
# Install Wofi via system packages
|
|
environment.systemPackages = [
|
|
pkgs.wofi
|
|
];
|
|
|
|
_module.args.hmUsers = {
|
|
${username} = {
|
|
|
|
home.file = {
|
|
".config/wofi/config" = {
|
|
source = "${assetPath}/config";
|
|
force = true; # overwrite existing
|
|
};
|
|
".config/wofi/style.css" = {
|
|
source = "${assetPath}/style.css";
|
|
force = true; # overwrite existing
|
|
};
|
|
};
|
|
|
|
# Ensure ~/.config/wofi exists before writing files
|
|
home.activation.fixWofiDir = lib.hm.dag.entryAfter ["writeBoundary"] ''
|
|
mkdir -p $HOME/.config/wofi
|
|
chmod -R u+rwx $HOME/.config/wofi
|
|
'';
|
|
};
|
|
};
|
|
}
|