aboutsummaryrefslogtreecommitdiff
path: root/tw/home
diff options
context:
space:
mode:
Diffstat (limited to 'tw/home')
-rw-r--r--tw/home/btl.scm36
-rw-r--r--tw/home/frm.scm22
-rw-r--r--tw/home/lap.scm19
3 files changed, 62 insertions, 15 deletions
diff --git a/tw/home/btl.scm b/tw/home/btl.scm
index 22053bfe..fe476ad9 100644
--- a/tw/home/btl.scm
+++ b/tw/home/btl.scm
@@ -107,6 +107,42 @@
(default-key "53EC3C06856883DD92355BC22FC78504681F69B0")
(gui-pinentry? #t)))
+ (service home-restic-backup-service-type
+ (list (restic-scheduled-backup
+ (schedule #~"0 */2 * * *")
+ (paths '(;; important user data
+ "~/src"
+ "~/.local/share/zsh/history"
+ ;; secrets
+ "~/.local/share/ssh-keys"
+ "~/.local/share/gnupg"
+ "~/.config/cern-ca-bundle.crt"
+ "~/.config/grid-personal-cert.pem"
+ "~/.config/grid-personal-key.pem"
+ "~/.config/syncthing"
+ ;; games
+ "~/savegames"
+ "~/.config/simutrans"
+ "~/.local/share/0ad"
+ "~/.local/share/warzone2100"
+ "~/.local/share/widelands"
+ "~/.local/share/ksp-overlay/upper"
+ "~/.pioneer"))
+ (repo (restic-vin.wg-repo "timo/battleship"))
+ (password (restic-pass-key "computers/vin/restic-repos/timo-battleship")))
+
+ (restic-scheduled-backup
+ (schedule #~"20 */2 * * *") ; try to avoid lock contention
+ (paths '("~/documents"
+ "~/sync"
+ "~/audiobooks"
+ "~/music"
+ "~/pictures"
+ "~/videos/youtube/.yt-dlp"
+ "~/videos/youtube/.config"))
+ (repo (restic-vin.wg-repo "timo/sync"))
+ (password (restic-pass-key "computers/vin/restic-repos/timo-sync")))))
+
(append (interactive-services) %pim-services %common-services)))))
%btl-home
diff --git a/tw/home/frm.scm b/tw/home/frm.scm
index 56358802..03d07830 100644
--- a/tw/home/frm.scm
+++ b/tw/home/frm.scm
@@ -114,6 +114,28 @@
(default-key "53EC3C06856883DD92355BC22FC78504681F69B0")
(gui-pinentry? #t)))
+ (service home-restic-backup-service-type
+ (list (restic-scheduled-backup
+ (schedule #~"0 */2 * * *")
+ (paths '(;; important user data
+ "~/src"
+ "~/.local/share/zsh/history"
+ ;; secrets
+ "~/.local/share/ssh-keys"
+ "~/.local/share/gnupg"
+ "~/.config/cern-ca-bundle.crt"
+ "~/.config/grid-personal-cert.pem"
+ "~/.config/grid-personal-key.pem"
+ "~/.config/syncthing"))
+ (repo (restic-vin.wg-repo "timo/framework"))
+ (password (restic-pass-key "computers/vin/restic-repos/timo-framework")))
+
+ (restic-scheduled-backup
+ (schedule #~"30 */2 * * *") ; try to avoid lock contention
+ (paths '("~/documents" "~/sync" "~/pictures"))
+ (repo (restic-vin.wg-repo "timo/sync"))
+ (password (restic-pass-key "computers/vin/restic-repos/timo-sync")))))
+
(append (interactive-services) %pim-services %common-services)))))
%frm-home
diff --git a/tw/home/lap.scm b/tw/home/lap.scm
index d271e268..1a5fb535 100644
--- a/tw/home/lap.scm
+++ b/tw/home/lap.scm
@@ -40,17 +40,6 @@
#:use-module (tw services restic)
#:use-module (tw theme))
-(define (restic-pass-key key)
- (restic-password-source (type 'pass) (name key)))
-
-(define (restic-vin.wg-repo path)
- (restic-rest-repository
- (username "timo")
- (password (restic-pass-key "computers/vin/restic-server/timo"))
- (hostname "vin.wg")
- (port 8181)
- (path path)))
-
(define-public %lap-home
(home-environment
(packages
@@ -87,7 +76,6 @@
(list (restic-scheduled-backup
(schedule #~"0 */2 * * *")
(paths '(;; important user data
- "~/documents"
"~/src"
"~/.local/share/zsh/history"
;; secrets
@@ -111,11 +99,12 @@
(password (restic-pass-key "computers/vin/restic-repos/timo-laptop")))
(restic-scheduled-backup
- (schedule #~"10 */2 * * *")
- (paths '("~/audiobooks"
+ (schedule #~"10 */2 * * *") ; try to avoid lock contention
+ (paths '("~/documents"
+ "~/sync"
+ "~/audiobooks"
"~/music"
"~/pictures"
- "~/sync"
"~/videos/youtube/.yt-dlp"
"~/videos/youtube/.config"))
(repo (restic-vin.wg-repo "timo/sync"))