home: symlink-manager: Remove appending of leading dot.
* gnu/home/services.scm (xdg-configuration-files-directory): Add leading dot. * gnu/home/services.scm (xdg-configuration-files-service-type): Change name. * gnu/home/services/shells.scm (add-shell-profile-file, zsh-get-configuration-files, add-zsh-dot-configuration, add-zsh-xdg-configuration, add-bash-configuration): Add leading dots. * gnu/home/services/symlink-manager.scm (update-symlinks-script): Remove leading dot. Signed-off-by: Ludovic Courtès <ludo@gnu.org>master
parent
868da34d54
commit
5832d9fb60
|
@ -285,10 +285,10 @@ directory containing FILES."
|
||||||
(description "Files that will be put in
|
(description "Files that will be put in
|
||||||
@file{~~/.guix-home/files}, and further processed during activation.")))
|
@file{~~/.guix-home/files}, and further processed during activation.")))
|
||||||
|
|
||||||
(define xdg-configuration-files-directory "config")
|
(define xdg-configuration-files-directory ".config")
|
||||||
|
|
||||||
(define (xdg-configuration-files files)
|
(define (xdg-configuration-files files)
|
||||||
"Add config/ prefix to each file-path in FILES."
|
"Add .config/ prefix to each file-path in FILES."
|
||||||
(map (match-lambda
|
(map (match-lambda
|
||||||
((file-path . rest)
|
((file-path . rest)
|
||||||
(cons (string-append xdg-configuration-files-directory "/" file-path)
|
(cons (string-append xdg-configuration-files-directory "/" file-path)
|
||||||
|
@ -296,7 +296,7 @@ directory containing FILES."
|
||||||
files))
|
files))
|
||||||
|
|
||||||
(define home-xdg-configuration-files-service-type
|
(define home-xdg-configuration-files-service-type
|
||||||
(service-type (name 'home-files)
|
(service-type (name 'home-xdg-configuration)
|
||||||
(extensions
|
(extensions
|
||||||
(list (service-extension home-files-service-type
|
(list (service-extension home-files-service-type
|
||||||
xdg-configuration-files)))
|
xdg-configuration-files)))
|
||||||
|
@ -304,7 +304,7 @@ directory containing FILES."
|
||||||
(extend append)
|
(extend append)
|
||||||
(default-value '())
|
(default-value '())
|
||||||
(description "Files that will be put in
|
(description "Files that will be put in
|
||||||
@file{~~/.guix-home/files/config}, and further processed during activation.")))
|
@file{~~/.guix-home/files/.config}, and further processed during activation.")))
|
||||||
|
|
||||||
(define %initialize-gettext
|
(define %initialize-gettext
|
||||||
#~(begin
|
#~(begin
|
||||||
|
|
|
@ -77,7 +77,7 @@ user's customizations. Extend home-shell-profile service only if you
|
||||||
really know what you do."))
|
really know what you do."))
|
||||||
|
|
||||||
(define (add-shell-profile-file config)
|
(define (add-shell-profile-file config)
|
||||||
`(("profile"
|
`((".profile"
|
||||||
,(mixed-text-file
|
,(mixed-text-file
|
||||||
"shell-profile"
|
"shell-profile"
|
||||||
"\
|
"\
|
||||||
|
@ -211,16 +211,16 @@ source ~/.profile
|
||||||
(zsh-serialize-field config field)))))
|
(zsh-serialize-field config field)))))
|
||||||
|
|
||||||
(define (zsh-get-configuration-files config)
|
(define (zsh-get-configuration-files config)
|
||||||
`(("zprofile" ,(zsh-file-by-field config 'zprofile)) ;; Always non-empty
|
`((".zprofile" ,(zsh-file-by-field config 'zprofile)) ;; Always non-empty
|
||||||
,@(if (or (zsh-field-not-empty? config 'zshenv)
|
,@(if (or (zsh-field-not-empty? config 'zshenv)
|
||||||
(zsh-field-not-empty? config 'environment-variables))
|
(zsh-field-not-empty? config 'environment-variables))
|
||||||
`(("zshenv" ,(zsh-file-by-field config 'zshenv))) '())
|
`((".zshenv" ,(zsh-file-by-field config 'zshenv))) '())
|
||||||
,@(if (zsh-field-not-empty? config 'zshrc)
|
,@(if (zsh-field-not-empty? config 'zshrc)
|
||||||
`(("zshrc" ,(zsh-file-by-field config 'zshrc))) '())
|
`((".zshrc" ,(zsh-file-by-field config 'zshrc))) '())
|
||||||
,@(if (zsh-field-not-empty? config 'zlogin)
|
,@(if (zsh-field-not-empty? config 'zlogin)
|
||||||
`(("zlogin" ,(zsh-file-by-field config 'zlogin))) '())
|
`((".zlogin" ,(zsh-file-by-field config 'zlogin))) '())
|
||||||
,@(if (zsh-field-not-empty? config 'zlogout)
|
,@(if (zsh-field-not-empty? config 'zlogout)
|
||||||
`(("zlogout" ,(zsh-file-by-field config 'zlogout))) '())))
|
`((".zlogout" ,(zsh-file-by-field config 'zlogout))) '())))
|
||||||
|
|
||||||
(define (zsh-home-files config)
|
(define (zsh-home-files config)
|
||||||
(define zshenv-auxiliary-file
|
(define zshenv-auxiliary-file
|
||||||
|
@ -230,14 +230,14 @@ source ~/.profile
|
||||||
"[[ -f $ZDOTDIR/.zshenv ]] && source $ZDOTDIR/.zshenv\n"))
|
"[[ -f $ZDOTDIR/.zshenv ]] && source $ZDOTDIR/.zshenv\n"))
|
||||||
|
|
||||||
(if (home-zsh-configuration-xdg-flavor? config)
|
(if (home-zsh-configuration-xdg-flavor? config)
|
||||||
`(("zshenv" ,zshenv-auxiliary-file))
|
`((".zshenv" ,zshenv-auxiliary-file))
|
||||||
(zsh-get-configuration-files config)))
|
(zsh-get-configuration-files config)))
|
||||||
|
|
||||||
(define (zsh-xdg-configuration-files config)
|
(define (zsh-xdg-configuration-files config)
|
||||||
(if (home-zsh-configuration-xdg-flavor? config)
|
(if (home-zsh-configuration-xdg-flavor? config)
|
||||||
(map
|
(map
|
||||||
(lambda (lst)
|
(lambda (lst)
|
||||||
(cons (string-append "zsh/." (car lst))
|
(cons (string-append "zsh/" (car lst))
|
||||||
(cdr lst)))
|
(cdr lst)))
|
||||||
(zsh-get-configuration-files config))
|
(zsh-get-configuration-files config))
|
||||||
'()))
|
'()))
|
||||||
|
@ -430,7 +430,7 @@ alias grep='grep --color=auto'\n")
|
||||||
(field-obj (car (filter-fields field))))
|
(field-obj (car (filter-fields field))))
|
||||||
(if (or extra-content
|
(if (or extra-content
|
||||||
(not (null? ((configuration-field-getter field-obj) config))))
|
(not (null? ((configuration-field-getter field-obj) config))))
|
||||||
`(,(object->snake-case-string file-name)
|
`(,(string-append "." (object->snake-case-string file-name))
|
||||||
,(apply mixed-text-file
|
,(apply mixed-text-file
|
||||||
(object->snake-case-string file-name)
|
(object->snake-case-string file-name)
|
||||||
(append (or extra-content '())
|
(append (or extra-content '())
|
||||||
|
@ -439,7 +439,7 @@ alias grep='grep --color=auto'\n")
|
||||||
|
|
||||||
(filter
|
(filter
|
||||||
(compose not null?)
|
(compose not null?)
|
||||||
`(("bash_profile"
|
`((".bash_profile"
|
||||||
,(mixed-text-file
|
,(mixed-text-file
|
||||||
"bash_profile"
|
"bash_profile"
|
||||||
"\
|
"\
|
||||||
|
|
|
@ -67,7 +67,7 @@ subdirectory from XDG_CONFIG_HOME to generate a target path."
|
||||||
(1+ (string-length home-directory)))
|
(1+ (string-length home-directory)))
|
||||||
(substring file
|
(substring file
|
||||||
(string-length #$xdg-configuration-files-directory)))
|
(string-length #$xdg-configuration-files-directory)))
|
||||||
(string-append "." file)))
|
file))
|
||||||
|
|
||||||
(define (target-file file)
|
(define (target-file file)
|
||||||
;; Return the target of FILE, a config file name sans leading dot
|
;; Return the target of FILE, a config file name sans leading dot
|
||||||
|
|
|
@ -421,7 +421,7 @@ that the application cannot open the specified MIME type.")
|
||||||
(define (add-xdg-desktop-entry-file entry)
|
(define (add-xdg-desktop-entry-file entry)
|
||||||
(let ((file (first entry))
|
(let ((file (first entry))
|
||||||
(config (second entry)))
|
(config (second entry)))
|
||||||
(list (format #f "local/share/applications/~a" file)
|
(list (format #f ".local/share/applications/~a" file)
|
||||||
(apply mixed-text-file
|
(apply mixed-text-file
|
||||||
(format #f "xdg-desktop-~a-entry" file)
|
(format #f "xdg-desktop-~a-entry" file)
|
||||||
config))))
|
config))))
|
||||||
|
|
Reference in New Issue