Regenerated

This commit is contained in:
2026-03-22 19:00:30 +00:00
parent fb5c05f49f
commit ff921ffc81
33 changed files with 0 additions and 1512 deletions
-38
View File
@@ -1,38 +0,0 @@
{ 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 = [];
};
}