Regenerated

This commit is contained in:
2026-03-22 18:59:32 +00:00
parent 5c8867a8df
commit fb5c05f49f
32 changed files with 1491 additions and 0 deletions
+38
View File
@@ -0,0 +1,38 @@
{ lib, config, pkgs, ... }:
let
programName = "wofi";
username = config.defaultUser or "henrov";
assetPath = ../../../assets/system/conf/${programName};
in
{
# Deploy assets to ~/.config/wofi via Home Manager
home-manager.users.${username}.home.file =
if builtins.pathExists assetPath then
lib.genAttrs (builtins.attrNames (builtins.readDir assetPath)) (name: {
source = "${assetPath}/${name}";
target = ".config/${programName}/${name}";
})
else {};
# Optional systemd service to sync assets manually
systemd.services."${programName}-sync" = {
description = "Sync ${programName} configuration files";
wantedBy = [ "multi-user.target" ];
after = [ "network-online.target" ];
serviceConfig = {
Type = "oneshot";
ExecStart = ''
set -euo pipefail
if [ -d "${assetPath}" ]; then
mkdir -p "/home/${username}/.config/${programName}"
cp -u ${lib.concatStringsSep " " (builtins.attrNames (builtins.readDir assetPath))} "${assetPath}/" "/home/${username}/.config/${programName}/"
fi
'';
};
restartTriggers = [ assetPath ];
path = [];
};
}