Skip to content

Commit cfe0ca5

Browse files
committed
Set PATH for git-sync tray services
1 parent 2005043 commit cfe0ca5

1 file changed

Lines changed: 18 additions & 9 deletions

File tree

nixos/git-sync.nix

Lines changed: 18 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,15 @@
1-
{ pkgs, lib, ... }:
2-
let
1+
{
2+
pkgs,
3+
lib,
4+
...
5+
}: let
6+
gitSyncServicePath = lib.makeBinPath [pkgs.coreutils pkgs.git pkgs.openssh];
37
mkGitSyncTrayOverrides = icon: {
48
Service = {
5-
Environment = [ "GIT_SYNC_TRAY=1" "GIT_SYNC_TRAY_ICON=${icon}" ];
9+
Environment = lib.mkMerge [
10+
["GIT_SYNC_TRAY=1" "GIT_SYNC_TRAY_ICON=${icon}"]
11+
(lib.mkAfter ["PATH=${gitSyncServicePath}"])
12+
];
613
Restart = lib.mkForce "on-failure";
714
RestartSec = 5;
815
};
@@ -12,7 +19,7 @@ let
1219
password-store = "password";
1320
};
1421
in {
15-
home-manager.users.imalison = ({ config, ... }: {
22+
home-manager.users.imalison = {config, ...}: {
1623
services.git-sync = {
1724
enable = true;
1825
package = pkgs.git-sync-rs;
@@ -29,13 +36,15 @@ in {
2936
};
3037
};
3138

32-
systemd.user.services = lib.mapAttrs'
33-
(name: _: lib.nameValuePair "git-sync-${name}"
39+
systemd.user.services =
40+
lib.mapAttrs'
41+
(name: _:
42+
lib.nameValuePair "git-sync-${name}"
3443
(mkGitSyncTrayOverrides (repoIcons.${name} or "git")))
3544
config.services.git-sync.repositories;
36-
});
45+
};
3746

38-
home-manager.users.kat = ({ config, ... }: {
47+
home-manager.users.kat = {config, ...}: {
3948
services.git-sync = {
4049
enable = true;
4150
repositories = {
@@ -50,5 +59,5 @@ in {
5059
};
5160
};
5261
};
53-
});
62+
};
5463
}

0 commit comments

Comments
 (0)