add pass-sync timer
This commit is contained in:
parent
f3c62fd391
commit
ae96c9dd78
2 changed files with 32 additions and 9 deletions
|
@ -540,16 +540,16 @@ TODO
|
|||
#+end_src
|
||||
** Password-Store
|
||||
#+begin_src emacs-lisp
|
||||
(use-package password-store
|
||||
:bind (("C-c p p" . password-store-copy)
|
||||
("C-c p i" . password-store-insert)
|
||||
("C-c p g" . password-store-generate))
|
||||
:config
|
||||
(setq password-store-password-length 12))
|
||||
(use-package password-store
|
||||
:bind (("C-c p p" . password-store-copy)
|
||||
("C-c p i" . password-store-insert)
|
||||
("C-c p g" . password-store-generate))
|
||||
:config
|
||||
(setq password-store-password-length 12))
|
||||
|
||||
(use-package auth-source-pass
|
||||
:config
|
||||
(auth-source-pass-enable))
|
||||
(use-package auth-source-pass
|
||||
:config
|
||||
(auth-source-pass-enable))
|
||||
#+end_src
|
||||
** OAuth2
|
||||
this should be useful later
|
||||
|
|
|
@ -17,5 +17,28 @@ in {
|
|||
users.users.sako.packages = with pkgs; [
|
||||
(pass.withExtensions (pkgs: with pkgs; [pass-otp pass-import pass-genphrase pass-checkup]))
|
||||
];
|
||||
|
||||
# systemd timer to run git pull and git push
|
||||
systemd.timers."pass-sync" = {
|
||||
wantedBy = [ "timers.target" ];
|
||||
timerConfig = {
|
||||
OnBootSec = "1m";
|
||||
OnUnitActiveSec = "1h";
|
||||
Unit = "pass-sync.service";
|
||||
};
|
||||
};
|
||||
|
||||
systemd.services."pass-sync" = {
|
||||
script = ''
|
||||
set -eu
|
||||
${pkgs.coreutils}/bin/echo "Hello World"
|
||||
${pkgs.pass}/bin/pass git pull
|
||||
${pkgs.pass}/bin/pass git push
|
||||
'';
|
||||
serviceConfig = {
|
||||
Type = "oneshot";
|
||||
User = "sako";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue