diff options
Diffstat (limited to 'kbg/services/config/guix.scm')
-rw-r--r-- | kbg/services/config/guix.scm | 28 |
1 files changed, 21 insertions, 7 deletions
diff --git a/kbg/services/config/guix.scm b/kbg/services/config/guix.scm index a89f0755..a63377b6 100644 --- a/kbg/services/config/guix.scm +++ b/kbg/services/config/guix.scm @@ -2,12 +2,26 @@ #:use-module (kbg) #:use-module (gnu) #:use-module (guix) - #:use-module (gnu home services)) + #:use-module (gnu home services) + #:use-module (ice-9 textual-ports)) (define-public guix-config-service - (list (simple-service 'guix-config - home-files-service-type - `((".config/guix/channels.scm" - ,(local-file (string-append %dotfiles-root "config/guix/channels.scm"))) - (".config/guix/shell-authorized-directories" - ,(local-file (string-append %dotfiles-root "config/guix/shell-authorized-directories"))))))) + (let ((shell-auth-dirs (string-append %dotfiles-root "config/guix/shell-authorized-directories")) + (shell-auth-dirs-template (string-append %dotfiles-root "config/guix/shell-authorized-directories.template"))) + (list (simple-service 'guix-config + home-files-service-type + `((".config/guix/channels.scm" + ,(local-file (string-append %dotfiles-root "config/guix/channels.scm"))) + (".config/guix/shell-authorized-directories" + ,(plain-file "kb-shell-authorized-directories" + (string-join (list (call-with-input-file shell-auth-dirs-template get-string-all) + (if (file-exists? shell-auth-dirs) + (call-with-input-file shell-auth-dirs get-string-all) + "")) + "\n")) + ) + ) + ) + ) + ) + ) |