From 66bf3a3fa4ac963dcdafb04b6bfcffe43a0b0b07 Mon Sep 17 00:00:00 2001 From: Franck Cuny Date: Sun, 13 Feb 2022 16:02:08 -0800 Subject: 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'. --- users/fcuny/desktop/trust/pass.nix | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'users') 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"; }; }; -- cgit 1.4.1