backup.lisp 777 B

12345678910111213141516
  1. (in-package :stumpwm)
  2. (defun xpanes-command (command)
  3. (format nil "xpanes -t -c ~s" command))
  4. (defcommand xpanes-restic-snapshots () ()
  5. (term-shell-command (join `(,(xpanes-command (join `("sudo" "-i" ,(format nil "RESTIC_PASSWORD=~a"
  6. (password-store-show "wugi.info/restic/all"))
  7. ,(format nil "~a/.guix-profile/bin/restic" (getenv "HOME"))
  8. "-r" "/srv/backup/{}" "snapshots")))
  9. ,@'("guixsd" "majordomo" "oracle" "spb")))
  10. :title "xpanes-restic-snapshots"))
  11. (defcommand-alias restic-snapshots xpanes-restic-snapshots)