summaryrefslogtreecommitdiff
path: root/tw/home/lap.scm
diff options
context:
space:
mode:
authorTimo Wilken2023-09-19 23:32:26 +0200
committerTimo Wilken2023-09-19 23:47:46 +0200
commit47f8e82a3c33fadce4524b750915d92e8e5b9c4b (patch)
tree5393cc33e9befa9395643b04239a092e4b107c58 /tw/home/lap.scm
parentf0a13928bcc907a92e01f194ceef806318d42f3c (diff)
Formalise password keys to avoid PATH issues
Mcron seems to set a restricted PATH now, so make sure it knows where to find "pass". Also use less shell substitution and implement repository URL building in Guile.
Diffstat (limited to 'tw/home/lap.scm')
-rw-r--r--tw/home/lap.scm18
1 files changed, 14 insertions, 4 deletions
diff --git a/tw/home/lap.scm b/tw/home/lap.scm
index b00b8c20..1df2e707 100644
--- a/tw/home/lap.scm
+++ b/tw/home/lap.scm
@@ -141,8 +141,13 @@
"~/.local/share/widelands"
"~/.local/share/guix-sandbox-home/.local/share/Colossal Order/Cities_Skylines"
"~/.local/share/guix-sandbox-home/.local/share/Surviving Mars"))
- (url-command "echo \"rest:http://timo:$(pass computers/vin/restic-server/timo | head -1)@vin.wg:8181/timo/laptop\"")
- (password-command "pass computers/vin/restic-repos/laptop"))
+ (url (restic-rest-repository
+ (username "timo")
+ (password-key "computers/vin/restic-server/timo")
+ (hostname "vin.wg")
+ (port 8181)
+ (path "timo/laptop")))
+ (password-key "computers/vin/restic-repos/laptop"))
(restic-backup-repository
(schedule #~"10 */2 * * *")
@@ -152,8 +157,13 @@
"~/sync"
"~/videos/youtube/.yt-dlp"
"~/videos/youtube/.config"))
- (url-command "echo \"rest:http://timo:$(pass computers/vin/restic-server/timo | head -1)@vin.wg:8181/timo/sync\"")
- (password-command "pass computers/vin/restic-repos/sync"))))
+ (url (restic-rest-repository
+ (username "timo")
+ (password-key "computers/vin/restic-server/timo")
+ (hostname "vin.wg")
+ (port 8181)
+ (path "timo/sync")))
+ (password-key "computers/vin/restic-repos/sync"))))
;; Redshift: make the screen turn redder at night.
(service home-redshift-service-type