]> git.ekhem.eu.org Git - guix.git/commitdiff
[home] Stop the home services before reconfiguring.
authorJakub Czajka <jakub@ekhem.eu.org>
Mon, 14 Sep 2026 21:39:03 +0000 (21:39 +0000)
committerJakub Czajka <jakub@ekhem.eu.org>
Sun, 22 Nov 2026 10:42:39 +0000 (10:42 +0000)
guix home reconfigure only loads new definitions into the running
Shepherd, so a changed running service is parked as a replacement while
the old process keeps serving; home-nonfree, home-libre, and vps-home
now stop claude-proxy and paseo-daemon before reconfiguring. A proxy
orphaned by a killed Shepherd keeps its port and needs a manual kill.

Makefile

index 46a68a439d48afcf4b555610b92a2a89ca387cdd..95646cdbc6d75c54d23e7089f8875a0f56eef158 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -5,12 +5,22 @@ guix-profile := ~/.guix-home/profile
 guix-store := /gnu/store
 guix-version := $(shell guix show guix | sed -n '/^version/s/^.*: //gp')
 
-home-nonfree:
-       GUIX_PACKAGE_PATH=`pwd` PROFILE=nonfree guix home reconfigure home.scm
+.PHONY: stop-home-services
+stop-home-services:
+       @for svc in claude-proxy paseo-daemon; do \
+           ~/.guix-home/profile/bin/herd stop "$$svc" 2>/dev/null \
+               && echo "Stopped $$svc." \
+               || echo "Service $$svc is not running (or not known)."; \
+       done
+
+home-nonfree: stop-home-services
+       $(guix-env) GUIX_PACKAGE_PATH=$(CURDIR) PROFILE=nonfree \
+           guix home reconfigure home.scm
        . $(guix-profile)/etc/profile
 
-home-libre:
-       GUIX_PACKAGE_PATH=`pwd` PROFILE=libre guix home reconfigure home.scm
+home-libre: stop-home-services
+       $(guix-env) GUIX_PACKAGE_PATH=$(CURDIR) PROFILE=libre \
+           guix home reconfigure home.scm
        . $(guix-profile)/etc/profile
 
 system-nonfree:
@@ -19,9 +29,10 @@ system-nonfree:
 system-libre:
        sudo GUIX_PACKAGE_PATH=`pwd` PROFILE=libre guix system reconfigure system.scm
 
-vps-home:
-       GUIX_PACKAGE_PATH=`pwd` guix home reconfigure \
-           -L `pwd` -e '(@ (vps-home) vps-home-environment)'
+vps-home: stop-home-services
+       $(guix-env) GUIX_PACKAGE_PATH=$(CURDIR) guix home reconfigure \
+           -L $(CURDIR) -e '(@ (vps-home) vps-home-environment)' \
+           --substitute-urls="https://substitutes.nonguix.org https://bordeaux.guix.gnu.org https://ci.guix.gnu.org"
        . $(guix-profile)/etc/profile
 
 vps-system: