diff options
-rw-r--r-- | suweren/home.scm | 9 | ||||
-rw-r--r-- | suweren/update.scm | 16 |
2 files changed, 19 insertions, 6 deletions
diff --git a/suweren/home.scm b/suweren/home.scm index c441b6f..289ac9a 100644 --- a/suweren/home.scm +++ b/suweren/home.scm @@ -34,7 +34,9 @@ ;; update-commands #:use-module (suweren update)) -(define-public %suweren-home-services +;; string -> +;; (record service) +(define-public (%suweren-home-services system user) (let* ((packages (list gnupg librewolf)) @@ -45,7 +47,8 @@ (profile (simple-service 'default-home-packages home-profile-service-type packages)) - (shepherd (service home-shepherd-service-type))) + (shepherd (service home-shepherd-service-type)) + (update-commands* (update-commands system user))) (list bash dbus pipewire @@ -53,4 +56,4 @@ shepherd suweren-home-fontconfig-service-type suweren-home-xdg-configuration-files-extension - update-commands))) + update-commands*))) diff --git a/suweren/update.scm b/suweren/update.scm index 7c1ec35..2826b00 100644 --- a/suweren/update.scm +++ b/suweren/update.scm @@ -2,17 +2,27 @@ #:use-module (gnu home services shells) #:use-module (gnu services)) -(define-public update-commands +(define-public (update-commands system user) (let* ((allow-downgrades "--allow-downgrades ") (and "&& ") (collect-garbage "sudo guix gc -d 7d ") (pull-guix "guix pull ") (reconfigure-home (string-append "guix home delete-generations 7d ; " "guix home reconfigure -e " - "'(@ (users $USER) home)' ")) + "'((@ (users " + user + ") " + user + "-home-environment) \"" + system + "\")' ")) (reconfigure-system (string-append "sudo guix system delete-generations 7d ; " "sudo guix system reconfigure -e " - "'(@ (systems $HOSTNAME system-configuration) $HOSTNAME)' ")) + "'(@ (systems " + system + " system-configuration) " + system + ")' ")) (reupdate-system (string-append pull-guix allow-downgrades |