diff options
author | Franck Cuny <franck@fcuny.net> | 2022-02-13 16:02:08 -0800 |
---|---|---|
committer | Franck Cuny <franck@fcuny.net> | 2022-02-13 16:07:54 -0800 |
commit | 66bf3a3fa4ac963dcdafb04b6bfcffe43a0b0b07 (patch) | |
tree | 555cc88a5f32797af581162a86beb14710763e16 /users | |
parent | flake.lock (diff) | |
download | world-66bf3a3fa4ac963dcdafb04b6bfcffe43a0b0b07.tar.gz |
password-store: set location in the environment
Set the location for the password-store's store in the environment variable of the unit. Without that environment variable, the program assumes the store is under '$HOME/.password-store'.
Diffstat (limited to '')
-rw-r--r-- | users/fcuny/desktop/trust/pass.nix | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/users/fcuny/desktop/trust/pass.nix b/users/fcuny/desktop/trust/pass.nix index e2d9565..4273e40 100644 --- a/users/fcuny/desktop/trust/pass.nix +++ b/users/fcuny/desktop/trust/pass.nix @@ -8,16 +8,17 @@ systemd.user.services.git-password-store = { Unit = { - Description = "password-store synchronization service"; + Description = "password-store synchronization to git"; Documentation = [ "man:pass(1)" "https://git.fcuny.net/fcuny/password-store" ]; - ConditionPathIsDirectory = "%h/.local/share/password-store/.git"; + ConditionPathIsDirectory = "${config.programs.password-store.service.PASSWORD_STORE_DIR}/.git"; }; Service = { Type = "oneshot"; - WorkingDirectory = "%h/.local/share/password-store/.git"; + Environment = "PASSWORD_STORE_DIR=${config.programs.password-store.service.PASSWORD_STORE_DIR}"; + WorkingDirectory = config.programs.password-store.settings.PASSWORD_STORE_DIR; ExecStart = "${pkgs.git}/bin/git push origin %H"; }; }; |