summaryrefslogtreecommitdiff
path: root/accounts/gkleen@sif
diff options
context:
space:
mode:
authorGregor Kleen <gkleen@yggdrasil.li>2022-01-31 19:26:00 +0100
committerGregor Kleen <gkleen@yggdrasil.li>2022-01-31 19:26:00 +0100
commitaf763b3783d685346cff6e3ce1557a5d962b52b1 (patch)
treef2250294cf848b21c473b084c01679e786cd7b49 /accounts/gkleen@sif
parent3ca1d52353f69f118a4081a2802c9ba4c3cf6f01 (diff)
downloadnixos-af763b3783d685346cff6e3ce1557a5d962b52b1.tar
nixos-af763b3783d685346cff6e3ce1557a5d962b52b1.tar.gz
nixos-af763b3783d685346cff6e3ce1557a5d962b52b1.tar.bz2
nixos-af763b3783d685346cff6e3ce1557a5d962b52b1.tar.xz
nixos-af763b3783d685346cff6e3ce1557a5d962b52b1.zip
...
Diffstat (limited to 'accounts/gkleen@sif')
-rw-r--r--accounts/gkleen@sif/systemd.nix13
1 files changed, 12 insertions, 1 deletions
diff --git a/accounts/gkleen@sif/systemd.nix b/accounts/gkleen@sif/systemd.nix
index 6bb8cf8e..4ed75e85 100644
--- a/accounts/gkleen@sif/systemd.nix
+++ b/accounts/gkleen@sif/systemd.nix
@@ -44,10 +44,21 @@ let
44in { 44in {
45 services = { 45 services = {
46 sync-keepass = { 46 sync-keepass = {
47 path = with pkgs; [ rclone ];
47 Service = { 48 Service = {
48 Type = "oneshot"; 49 Type = "oneshot";
49 WorkingDirectory = "~"; 50 WorkingDirectory = "~";
50 ExecStart = "${pkgs.lftp}/bin/lftp -f ${./store.kdbx.lftp}"; 51 ExecStart = pkgs.writers.writePython3 "sync-keepass" {} ''
52 import json
53 import subprocess
54 from datetime import datetime
55
56 res = None
57 with subprocess.Popen(['rclone', 'lsjson', 'surtr:store.kdbx'], stdout=subprocess.PIPE) as proc:
58 res = json.load(proc.stdout)
59 print(res)
60 '';
61 Environment = "RCLONE_PASSWORD_COMMAND=\"cat ${config.sops.secrets.gkleen-rclone.path}\"";
51 }; 62 };
52 }; 63 };
53 emacs = { 64 emacs = {