]> git.ekhem.eu.org Git - guix.git/commitdiff
[home] Fix duplicate service type conflict in home reconfigure.
authorJakub Czajka <jakub@ekhem.eu.org>
Sat, 20 Jun 2026 21:44:28 +0000 (23:44 +0200)
committerJakub Czajka <jakub@ekhem.eu.org>
Wed, 24 Jun 2026 22:53:20 +0000 (00:53 +0200)
home-symlink-service-type was named 'home-profile', colliding with
the built-in home-profile-service-type.  Additionally, both
profile-service (bash.scm) and channels-service (guix.scm) directly
instantiated home-symlink-service-type — but Guix allows only one
direct (service <type> ...) per service type across the entire service
graph.

Changes:
- symlink.scm: Rename service type from 'home-profile' to
  'home-symlink', reflecting its actual purpose.
- bash.scm: Route profile-service through home-program-service-type
  (which extends home-symlink-service-type via service-extension)
  instead of directly instantiating it.  Remove unused
  (conf home symlink) import.
- guix.scm: Same for channels-service.  Switch import from
  (conf home symlink) to (conf home program).

Service extensions can be merged by Guix; direct instantiations
cannot, hence the "more than one target service" error.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
conf/home/bash.scm
conf/home/guix.scm
conf/home/symlink.scm

index eab3bd8df9011d575284c22641373e9f189d8ab2..851c1c61e90f23af56680da34746712dc6644499 100644 (file)
@@ -5,7 +5,6 @@
 
 (define-module (conf home bash)
   #:use-module (conf home program)
-  #:use-module (conf home symlink)
   #:use-module (gnu home services)
   #:use-module (gnu packages bash)
   #:use-module (gnu packages xdisorg)
 (define bash-service
   (service home-bash-service-type))
 
+(define profile-dotfiles
+  (list "bash/.config/profile.d/10-xdg.sh" "bash/.config/profile.d/20-env.sh"
+        "bash/.config/profile.d/20-less.sh"
+        "bash/.config/profile.d/50-bash.sh"))
+
 (define profile-service
-  (service home-symlink-service-type
-           (list "bash/.config/profile.d/10-xdg.sh"
-                 "bash/.config/profile.d/20-env.sh"
-                 "bash/.config/profile.d/20-less.sh"
-                 "bash/.config/profile.d/50-bash.sh")))
+  (service home-program-service-type
+           (home-program-configuration (packages '())
+                                       (dotfiles profile-dotfiles))))
 
 (define xprofile-dotfiles
   (list "X11/.config/X11/xbindkeysrc" "X11/.config/X11/Xresources"))
index 6f858d19d215ace32a5fac42999265b83c22cb28..f8c6bd5702f696c36def9f3fec9e91fb1a3e87f4 100644 (file)
@@ -4,10 +4,14 @@
 ;; guix.scm - configuration for GNU Guix.
 
 (define-module (conf home guix)
-  #:use-module (conf home symlink)
+  #:use-module (conf home program)
   #:use-module (gnu home services)
   #:export (channels-service))
 
+(define channels-dotfiles
+  (list "guix/.config/guix/channels.scm"))
+
 (define channels-service
-  (service home-symlink-service-type
-           (list "guix/.config/guix/channels.scm")))
+  (service home-program-service-type
+           (home-program-configuration (packages '())
+                                       (dotfiles channels-dotfiles))))
index 2be99fc1486fb7aa7e32ed6eb067a4291e216e4f..489aee225e74c93c1408c9172161053d274937f6 100644 (file)
@@ -26,7 +26,7 @@
   (map make-symlink-pair paths))
 
 (define home-symlink-service-type
-  (service-type (name 'home-profile)
+  (service-type (name 'home-symlink)
                 (extensions (list (service-extension home-files-service-type
                                                      symlink)))
                 (compose concatenate)