home: symlink-manager: Clarify module imports.
* gnu/home/services/symlink-manager.scm (update-symlinks-script): Wrap body in 'with-imported-modules'. Move (guix build utils) import to the top. Move #$%initialize-gettext after definitions.
This commit is contained in:
parent
25afd66a81
commit
66bf60a4cd
1 changed files with 155 additions and 151 deletions
|
@ -20,7 +20,7 @@
|
|||
(define-module (gnu home services symlink-manager)
|
||||
#:use-module (gnu home services)
|
||||
#:use-module (guix gexp)
|
||||
|
||||
#:use-module (guix modules)
|
||||
#:export (home-symlink-manager-service-type))
|
||||
|
||||
;;; Comment:
|
||||
|
@ -37,13 +37,17 @@
|
|||
(define (update-symlinks-script)
|
||||
(program-file
|
||||
"update-symlinks"
|
||||
(with-imported-modules (source-module-closure
|
||||
'((guix build utils)
|
||||
(guix i18n)))
|
||||
#~(begin
|
||||
(use-modules (ice-9 ftw)
|
||||
(ice-9 curried-definitions)
|
||||
(ice-9 match)
|
||||
(srfi srfi-1)
|
||||
(guix i18n))
|
||||
#$%initialize-gettext
|
||||
(guix i18n)
|
||||
(guix build utils))
|
||||
|
||||
(define ((simplify-file-tree parent) file)
|
||||
"Convert the result produced by `file-system-tree' to less
|
||||
verbose and more suitable for further processing format.
|
||||
|
@ -84,7 +88,7 @@ appear only after all nested items already listed."
|
|||
(list (cons 'dir path))
|
||||
(append-map (file-tree-traverse preordering) rest))))))
|
||||
|
||||
(use-modules (guix build utils))
|
||||
#$%initialize-gettext
|
||||
|
||||
(let* ((config-home (or (getenv "XDG_CONFIG_HOME")
|
||||
(string-append (getenv "HOME") "/.config")))
|
||||
|
@ -231,7 +235,7 @@ appear only after all nested items already listed."
|
|||
(symlink new-home new-he-path)
|
||||
(rename-file new-he-path he-path)
|
||||
|
||||
(display (G_" done\nFinished updating symlinks.\n\n"))))))
|
||||
(display (G_" done\nFinished updating symlinks.\n\n")))))))
|
||||
|
||||
|
||||
(define (update-symlinks-gexp _)
|
||||
|
|
Reference in a new issue