From ec7e790fe12a648c0b729e83dca11410ef352c5c Mon Sep 17 00:00:00 2001 From: Jakub Czajka Date: Fri, 3 Jun 2022 22:38:39 +0200 Subject: [PATCH] [home] Specify bash dotfiles as strings. This commit changes bash dotfiles argument type from `local-file` to `string`. Hide the `local-file` as an implementation detail. --- conf/home/bash.scm | 13 +++++++------ home.scm | 6 ++---- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/conf/home/bash.scm b/conf/home/bash.scm index e1eb980..cc16773 100644 --- a/conf/home/bash.scm +++ b/conf/home/bash.scm @@ -12,8 +12,7 @@ #:export (home-bash-configuration home-bash-service-type)) -;; Local file is already a gexp, so just return in. -(define (serialize-local-file field-name value) +(define (serialize-string field-name value) value) (define-configuration home-bash-configuration @@ -21,10 +20,10 @@ (package bash) "Packages to be installed by the service.") (bash-profile - (local-file) + (string) "Dotfile for login shells.") (bashrc - (local-file) + (string) "Dotfile for interactive non-login shells.")) (define (install-bash-packages config) @@ -32,9 +31,11 @@ (define (symlink-bash-dotfiles config) (list `(".bash_profile" - ,(home-bash-configuration-bash-profile config)) + ,(local-file (home-bash-configuration-bash-profile config) + "bash_profile")) `(".bashrc" - ,(home-bash-configuration-bashrc config)))) + ,(local-file (home-bash-configuration-bashrc config) + "bashrc")))) (define home-bash-service-type (service-type diff --git a/home.scm b/home.scm index 2e25e08..ac5b113 100644 --- a/home.scm +++ b/home.scm @@ -13,7 +13,5 @@ (services (list (service home-bash-service-type (home-bash-configuration - ;; `local-file` for a name with a dot causes an error. A - ;; workaround it put a different NAME argument. - (bash-profile (local-file "bash/.bash_profile" "bash_profile")) - (bashrc (local-file "bash/.bashrc" "bashrc"))))))) + (bash-profile "bash/.bash_profile") + (bashrc "bash/.bashrc")))))) -- 2.39.5