From a7cba80318c778322d1122ac2a8878dfd9464380 Mon Sep 17 00:00:00 2001 From: Jakub Czajka Date: Sat, 20 Jun 2026 23:44:28 +0200 Subject: [PATCH] [home] Fix duplicate service type conflict in home reconfigure. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 ...) 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 --- conf/home/bash.scm | 14 ++++++++------ conf/home/guix.scm | 10 +++++++--- conf/home/symlink.scm | 2 +- 3 files changed, 16 insertions(+), 10 deletions(-) diff --git a/conf/home/bash.scm b/conf/home/bash.scm index eab3bd8..851c1c6 100644 --- a/conf/home/bash.scm +++ b/conf/home/bash.scm @@ -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) @@ -48,12 +47,15 @@ (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")) diff --git a/conf/home/guix.scm b/conf/home/guix.scm index 6f858d1..f8c6bd5 100644 --- a/conf/home/guix.scm +++ b/conf/home/guix.scm @@ -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)))) diff --git a/conf/home/symlink.scm b/conf/home/symlink.scm index 2be99fc..489aee2 100644 --- a/conf/home/symlink.scm +++ b/conf/home/symlink.scm @@ -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) -- 2.47.3