From 47f8e82a3c33fadce4524b750915d92e8e5b9c4b Mon Sep 17 00:00:00 2001 From: Timo Wilken Date: Tue, 19 Sep 2023 23:32:26 +0200 Subject: 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. --- tw/home/lap.scm | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) (limited to 'tw/home/lap.scm') 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 -- cgit v1.2.3