Set PATH for git-sync tray services

This commit is contained in:
2026-05-04 22:17:23 -07:00
parent 200504318b
commit cfe0ca59bf

View File

@@ -1,8 +1,15 @@
{ pkgs, lib, ... }: {
let pkgs,
lib,
...
}: let
gitSyncServicePath = lib.makeBinPath [pkgs.coreutils pkgs.git pkgs.openssh];
mkGitSyncTrayOverrides = icon: { mkGitSyncTrayOverrides = icon: {
Service = { Service = {
Environment = [ "GIT_SYNC_TRAY=1" "GIT_SYNC_TRAY_ICON=${icon}" ]; Environment = lib.mkMerge [
["GIT_SYNC_TRAY=1" "GIT_SYNC_TRAY_ICON=${icon}"]
(lib.mkAfter ["PATH=${gitSyncServicePath}"])
];
Restart = lib.mkForce "on-failure"; Restart = lib.mkForce "on-failure";
RestartSec = 5; RestartSec = 5;
}; };
@@ -12,7 +19,7 @@ let
password-store = "password"; password-store = "password";
}; };
in { in {
home-manager.users.imalison = ({ config, ... }: { home-manager.users.imalison = {config, ...}: {
services.git-sync = { services.git-sync = {
enable = true; enable = true;
package = pkgs.git-sync-rs; package = pkgs.git-sync-rs;
@@ -29,13 +36,15 @@ in {
}; };
}; };
systemd.user.services = lib.mapAttrs' systemd.user.services =
(name: _: lib.nameValuePair "git-sync-${name}" lib.mapAttrs'
(name: _:
lib.nameValuePair "git-sync-${name}"
(mkGitSyncTrayOverrides (repoIcons.${name} or "git"))) (mkGitSyncTrayOverrides (repoIcons.${name} or "git")))
config.services.git-sync.repositories; config.services.git-sync.repositories;
}); };
home-manager.users.kat = ({ config, ... }: { home-manager.users.kat = {config, ...}: {
services.git-sync = { services.git-sync = {
enable = true; enable = true;
repositories = { repositories = {
@@ -50,5 +59,5 @@ in {
}; };
}; };
}; };
}); };
} }