system: Use 'file-append' to denote file names.

* gnu/services/avahi.scm, gnu/services/base.scm,
gnu/services/databases.scm, gnu/services/dbus.scm,
gnu/services/desktop.scm, gnu/services/dict.scm,
gnu/services/mail.scm, gnu/services/networking.scm,
gnu/services/sddm.scm, gnu/services/spice.scm,
gnu/services/ssh.scm, gnu/services/web.scm,
gnu/services/xorg.scm, gnu/system.scm: Replace the
 #~(string-append #$pkg "/bin/foo") idiom with
 (file-append pkg "/bin/foo").
This commit is contained in:
Ludovic Courtès 2016-09-10 12:03:47 +02:00
parent 1cdecf24f5
commit 9e41130b14
No known key found for this signature in database
GPG key ID: 090B11993D9AEBB5
14 changed files with 52 additions and 54 deletions

View file

@ -88,7 +88,7 @@ (define %avahi-accounts
(system? #t) (system? #t)
(comment "Avahi daemon user") (comment "Avahi daemon user")
(home-directory "/var/empty") (home-directory "/var/empty")
(shell #~(string-append #$shadow "/sbin/nologin"))))) (shell (file-append shadow "/sbin/nologin")))))
(define %avahi-activation (define %avahi-activation
;; Activation gexp. ;; Activation gexp.

View file

@ -516,7 +516,7 @@ (define rng-tools (rngd-configuration-rng-tools config))
(define device (rngd-configuration-device config)) (define device (rngd-configuration-device config))
(define rngd-command (define rngd-command
(list #~(string-append #$rng-tools "/sbin/rngd") (list (file-append rng-tools "/sbin/rngd")
"-f" "-r" device)) "-f" "-r" device))
(shepherd-service (shepherd-service
@ -893,7 +893,7 @@ (define-record-type* <syslog-configuration>
syslog-configuration make-syslog-configuration syslog-configuration make-syslog-configuration
syslog-configuration? syslog-configuration?
(syslogd syslog-configuration-syslogd (syslogd syslog-configuration-syslogd
(default #~(string-append #$inetutils "/libexec/syslogd"))) (default (file-append inetutils "/libexec/syslogd")))
(config-file syslog-configuration-config-file (config-file syslog-configuration-config-file
(default %default-syslog.conf))) (default %default-syslog.conf)))
@ -1009,7 +1009,7 @@ (define* (guix-build-accounts count #:key
(comment (format #f "Guix Build User ~2d" n)) (comment (format #f "Guix Build User ~2d" n))
(home-directory "/var/empty") (home-directory "/var/empty")
(shell #~(string-append #$shadow "/sbin/nologin")))) (shell (file-append shadow "/sbin/nologin"))))
1+ 1+
1)) 1))
@ -1036,7 +1036,7 @@ (define (hydra-key-authorization key guix)
(define %default-authorized-guix-keys (define %default-authorized-guix-keys
;; List of authorized substitute keys. ;; List of authorized substitute keys.
(list #~(string-append #$guix "/share/guix/hydra.gnu.org.pub"))) (list (file-append guix "/share/guix/hydra.gnu.org.pub")))
(define-record-type* <guix-configuration> (define-record-type* <guix-configuration>
guix-configuration make-guix-configuration guix-configuration make-guix-configuration
@ -1167,7 +1167,7 @@ (define %guix-publish-accounts
(system? #t) (system? #t)
(comment "guix publish user") (comment "guix publish user")
(home-directory "/var/empty") (home-directory "/var/empty")
(shell #~(string-append #$shadow "/sbin/nologin"))))) (shell (file-append shadow "/sbin/nologin")))))
(define guix-publish-service-type (define guix-publish-service-type
(service-type (name 'guix-publish) (service-type (name 'guix-publish)

View file

@ -76,7 +76,7 @@ (define %postgresql-accounts
(system? #t) (system? #t)
(comment "PostgreSQL server user") (comment "PostgreSQL server user")
(home-directory "/var/empty") (home-directory "/var/empty")
(shell #~(string-append #$shadow "/sbin/nologin"))))) (shell (file-append shadow "/sbin/nologin")))))
(define postgresql-activation (define postgresql-activation
(match-lambda (match-lambda
@ -171,7 +171,7 @@ (define %mysql-accounts
(group "mysql") (group "mysql")
(system? #t) (system? #t)
(home-directory "/var/empty") (home-directory "/var/empty")
(shell #~(string-append #$shadow "/sbin/nologin"))))) (shell (file-append shadow "/sbin/nologin")))))
(define mysql-configuration-file (define mysql-configuration-file
(match-lambda (match-lambda

View file

@ -128,13 +128,13 @@ (define %dbus-accounts
(system? #t) (system? #t)
(comment "D-Bus system bus user") (comment "D-Bus system bus user")
(home-directory "/var/run/dbus") (home-directory "/var/run/dbus")
(shell #~(string-append #$shadow "/sbin/nologin"))))) (shell (file-append shadow "/sbin/nologin")))))
(define dbus-setuid-programs (define dbus-setuid-programs
;; Return the file name of the setuid program that we need. ;; Return the file name of the setuid program that we need.
(match-lambda (match-lambda
(($ <dbus-configuration> dbus services) (($ <dbus-configuration> dbus services)
(list #~(string-append #$dbus "/libexec/dbus-daemon-launch-helper"))))) (list (file-append dbus "/libexec/dbus-daemon-launch-helper")))))
(define (dbus-activation config) (define (dbus-activation config)
"Return an activation gexp for D-Bus using @var{config}." "Return an activation gexp for D-Bus using @var{config}."

View file

@ -460,9 +460,8 @@ (define polkit-etc-files
(define polkit-setuid-programs (define polkit-setuid-programs
(match-lambda (match-lambda
(($ <polkit-configuration> polkit) (($ <polkit-configuration> polkit)
(list #~(string-append #$polkit (list (file-append polkit "/lib/polkit-1/polkit-agent-helper-1")
"/lib/polkit-1/polkit-agent-helper-1") (file-append polkit "/bin/pkexec")))))
#~(string-append #$polkit "/bin/pkexec")))))
(define polkit-service-type (define polkit-service-type
(service-type (name 'polkit) (service-type (name 'polkit)
@ -522,7 +521,7 @@ (define %colord-accounts
(system? #t) (system? #t)
(comment "colord daemon user") (comment "colord daemon user")
(home-directory "/var/empty") (home-directory "/var/empty")
(shell #~(string-append #$shadow "/sbin/nologin"))))) (shell (file-append shadow "/sbin/nologin")))))
(define colord-service-type (define colord-service-type
(service-type (name 'colord) (service-type (name 'colord)
@ -738,8 +737,8 @@ (define (pam-extension-procedure config)
(define pam-elogind (define pam-elogind
(pam-entry (pam-entry
(control "required") (control "required")
(module #~(string-append #$(elogind-package config) (module (file-append (elogind-package config)
"/lib/security/pam_elogind.so")))) "/lib/security/pam_elogind.so"))))
(list (lambda (pam) (list (lambda (pam)
(pam-service (pam-service

View file

@ -73,7 +73,7 @@ (define %dicod-accounts
(group "dicod") (group "dicod")
(system? #t) (system? #t)
(home-directory "/var/empty") (home-directory "/var/empty")
(shell #~(string-append #$shadow "/sbin/nologin"))))) (shell (file-append shadow "/sbin/nologin")))))
(define (dicod-configuration-file config) (define (dicod-configuration-file config)
(define database->text (define database->text

View file

@ -1505,7 +1505,7 @@ (define %dovecot-accounts
(system? #t) (system? #t)
(comment "Dovecot daemon user") (comment "Dovecot daemon user")
(home-directory "/var/empty") (home-directory "/var/empty")
(shell #~(string-append #$shadow "/sbin/nologin"))) (shell (file-append shadow "/sbin/nologin")))
(user-group (name "dovenull") (system? #t)) (user-group (name "dovenull") (system? #t))
(user-account (user-account
@ -1514,7 +1514,7 @@ (define %dovecot-accounts
(system? #t) (system? #t)
(comment "Dovecot daemon login user") (comment "Dovecot daemon login user")
(home-directory "/var/empty") (home-directory "/var/empty")
(shell #~(string-append #$shadow "/sbin/nologin"))))) (shell (file-append shadow "/sbin/nologin")))))
(define %dovecot-activation (define %dovecot-activation
;; Activation gexp. ;; Activation gexp.

View file

@ -194,7 +194,7 @@ (define dhcp-client-service-type
'dhcp-client 'dhcp-client
(lambda (dhcp) (lambda (dhcp)
(define dhclient (define dhclient
#~(string-append #$dhcp "/sbin/dhclient")) (file-append dhcp "/sbin/dhclient"))
(define pid-file (define pid-file
"/var/run/dhclient.pid") "/var/run/dhclient.pid")
@ -306,7 +306,7 @@ (define %ntp-accounts
(system? #t) (system? #t)
(comment "NTP daemon user") (comment "NTP daemon user")
(home-directory "/var/empty") (home-directory "/var/empty")
(shell #~(string-append #$shadow "/sbin/nologin"))))) (shell (file-append shadow "/sbin/nologin")))))
(define (ntp-service-activation config) (define (ntp-service-activation config)
@ -361,7 +361,7 @@ (define %tor-accounts
(system? #t) (system? #t)
(comment "Tor daemon user") (comment "Tor daemon user")
(home-directory "/var/empty") (home-directory "/var/empty")
(shell #~(string-append #$shadow "/sbin/nologin"))))) (shell (file-append shadow "/sbin/nologin")))))
(define-record-type <hidden-service> (define-record-type <hidden-service>
(hidden-service name mapping) (hidden-service name mapping)
@ -554,7 +554,7 @@ (define %bitlbee-accounts
(system? #t) (system? #t)
(comment "BitlBee daemon user") (comment "BitlBee daemon user")
(home-directory "/var/empty") (home-directory "/var/empty")
(shell #~(string-append #$shadow "/sbin/nologin"))))) (shell (file-append shadow "/sbin/nologin")))))
(define %bitlbee-activation (define %bitlbee-activation
;; Activation gexp for BitlBee. ;; Activation gexp for BitlBee.

View file

@ -48,9 +48,9 @@ (define-record-type* <sddm-configuration>
(numlock sddm-configuration-numlock (numlock sddm-configuration-numlock
(default "on")) (default "on"))
(halt-command sddm-configuration-halt-command (halt-command sddm-configuration-halt-command
(default #~(string-append #$shepherd "/sbin/halt"))) (default (file-append shepherd "/sbin/halt")))
(reboot-command sddm-configuration-reboot-command (reboot-command sddm-configuration-reboot-command
(default #~(string-append #$shepherd "/sbin/reboot"))) (default (file-append shepherd "/sbin/reboot")))
;; [Theme] ;; [Theme]
;; valid values are elarun or maldives ;; valid values are elarun or maldives
@ -75,24 +75,24 @@ (define-record-type* <sddm-configuration>
(hide-users sddm-configuration-hide-users (hide-users sddm-configuration-hide-users
(default "")) (default ""))
(hide-shells sddm-configuration-hide-shells (hide-shells sddm-configuration-hide-shells
(default #~(string-append #$shadow "/sbin/nologin"))) (default (file-append shadow "/sbin/nologin")))
;; [Wayland] ;; [Wayland]
(session-command sddm-configuration-session-command (session-command sddm-configuration-session-command
(default #~(string-append #$sddm "/share/sddm/scripts/wayland-session"))) (default (file-append sddm "/share/sddm/scripts/wayland-session")))
(sessions-directory sddm-configuration-sessions-directory (sessions-directory sddm-configuration-sessions-directory
(default "/run/current-system/profile/share/wayland-sessions")) (default "/run/current-system/profile/share/wayland-sessions"))
;; [X11] ;; [X11]
(xorg-server-path sddm-configuration-xorg-server-path (xorg-server-path sddm-configuration-xorg-server-path
(default (xorg-start-command))) (default (xorg-start-command)))
(xauth-path sddm-configuration-xauth-path (xauth-path sddm-configuration-xauth-path
(default #~(string-append #$xauth "/bin/xauth"))) (default (file-append xauth "/bin/xauth")))
(xephyr-path sddm-configuration-xephyr-path (xephyr-path sddm-configuration-xephyr-path
(default #~(string-append #$xorg-server "/bin/Xephyr"))) (default (file-append xorg-server "/bin/Xephyr")))
(xdisplay-start sddm-configuration-xdisplay-start (xdisplay-start sddm-configuration-xdisplay-start
(default #~(string-append #$sddm "/share/sddm/scripts/Xsetup"))) (default (file-append sddm "/share/sddm/scripts/Xsetup")))
(xdisplay-stop sddm-configuration-xdisplay-stop (xdisplay-stop sddm-configuration-xdisplay-stop
(default #~(string-append #$sddm "/share/sddm/scripts/Xstop"))) (default (file-append sddm "/share/sddm/scripts/Xstop")))
(xsession-command sddm-configuration-xsession-command (xsession-command sddm-configuration-xsession-command
(default (xinitrc))) (default (xinitrc)))
(xsessions-directory sddm-configuration-xsessions-directory (xsessions-directory sddm-configuration-xsessions-directory
@ -292,7 +292,7 @@ (define %sddm-accounts
(system? #t) (system? #t)
(comment "SDDM user") (comment "SDDM user")
(home-directory "/var/lib/sddm") (home-directory "/var/lib/sddm")
(shell #~(string-append #$shadow "/sbin/nologin"))))) (shell (file-append shadow "/sbin/nologin")))))
;; Add default themes to profile ;; Add default themes to profile
(define sddm-profile-service (define sddm-profile-service

View file

@ -43,7 +43,7 @@ (define spice-vdagent (spice-vdagent-configuration-spice-vdagent config))
(define spice-vdagentd-command (define spice-vdagentd-command
(list (list
#~(string-append #$spice-vdagent "/sbin/spice-vdagentd") (file-append spice-vdagent "/sbin/spice-vdagentd")
"-x")) "-x"))
(list (list

View file

@ -122,7 +122,7 @@ (define interfaces (lsh-configuration-interfaces config))
(define lsh-command (define lsh-command
(append (append
(cons #~(string-append #$lsh "/sbin/lshd") (cons (file-append lsh "/sbin/lshd")
(if daemonic? (if daemonic?
(let ((syslog (if (lsh-configuration-syslog-output? config) (let ((syslog (if (lsh-configuration-syslog-output? config)
'() '()

View file

@ -67,7 +67,7 @@ (define %nginx-accounts
(system? #t) (system? #t)
(comment "nginx server user") (comment "nginx server user")
(home-directory "/var/empty") (home-directory "/var/empty")
(shell #~(string-append #$shadow "/sbin/nologin"))))) (shell (file-append shadow "/sbin/nologin")))))
(define nginx-activation (define nginx-activation
(match-lambda (match-lambda
@ -86,7 +86,7 @@ (define nginx-activation
(define nginx-shepherd-service (define nginx-shepherd-service
(match-lambda (match-lambda
(($ <nginx-configuration> nginx log-directory run-directory config-file) (($ <nginx-configuration> nginx log-directory run-directory config-file)
(let* ((nginx-binary #~(string-append #$nginx "/sbin/nginx")) (let* ((nginx-binary (file-append nginx "/sbin/nginx"))
(nginx-action (nginx-action
(lambda args (lambda args
#~(lambda _ #~(lambda _

View file

@ -267,7 +267,7 @@ (define (exec-from-login-shell command . args)
(define %default-slim-theme (define %default-slim-theme
;; Theme based on work by Felipe López. ;; Theme based on work by Felipe López.
#~(string-append #$%artwork-repository "/slim")) (file-append %artwork-repository "/slim"))
(define %default-slim-theme-name (define %default-slim-theme-name
;; This must be the name of the sub-directory in %DEFAULT-SLIM-THEME that ;; This must be the name of the sub-directory in %DEFAULT-SLIM-THEME that
@ -374,8 +374,8 @@ (define* (slim-service #:key (slim slim)
(theme %default-slim-theme) (theme %default-slim-theme)
(theme-name %default-slim-theme-name) (theme-name %default-slim-theme-name)
(xauth xauth) (shepherd shepherd) (bash bash) (xauth xauth) (shepherd shepherd) (bash bash)
(auto-login-session #~(string-append #$windowmaker (auto-login-session (file-append windowmaker
"/bin/wmaker")) "/bin/wmaker"))
(startx (xorg-start-command))) (startx (xorg-start-command)))
"Return a service that spawns the SLiM graphical login manager, which in "Return a service that spawns the SLiM graphical login manager, which in
turn starts the X display server with @var{startx}, a command as returned by turn starts the X display server with @var{startx}, a command as returned by
@ -450,14 +450,13 @@ (define* (screen-locker-service package
for it. For example: for it. For example:
@lisp @lisp
(screen-locker-service xlockmore \"xlock\") (screen-locker-service xlockmore \"xlock\")
@end lisp @end lisp
makes the good ol' XlockMore usable." makes the good ol' XlockMore usable."
(service screen-locker-service-type (service screen-locker-service-type
(screen-locker program (screen-locker program
#~(string-append #$package (file-append package "/bin/" program)
#$(string-append "/bin/" program))
allow-empty-passwords?))) allow-empty-passwords?)))
;;; xorg.scm ends here ;;; xorg.scm ends here

View file

@ -472,9 +472,9 @@ (define* (operating-system-etc-service os)
source /run/current-system/profile/etc/profile.d/bash_completion.sh source /run/current-system/profile/etc/profile.d/bash_completion.sh
fi\n"))) fi\n")))
(etc-service (etc-service
`(("services" ,#~(string-append #$net-base "/etc/services")) `(("services" ,(file-append net-base "/etc/services"))
("protocols" ,#~(string-append #$net-base "/etc/protocols")) ("protocols" ,(file-append net-base "/etc/protocols"))
("rpc" ,#~(string-append #$net-base "/etc/rpc")) ("rpc" ,(file-append net-base "/etc/rpc"))
("login.defs" ,#~#$login.defs) ("login.defs" ,#~#$login.defs)
("issue" ,#~#$issue) ("issue" ,#~#$issue)
("nsswitch.conf" ,#~#$nsswitch) ("nsswitch.conf" ,#~#$nsswitch)
@ -482,8 +482,8 @@ (define* (operating-system-etc-service os)
("bashrc" ,#~#$bashrc) ("bashrc" ,#~#$bashrc)
("hosts" ,#~#$(or (operating-system-hosts-file os) ("hosts" ,#~#$(or (operating-system-hosts-file os)
(default-/etc/hosts (operating-system-host-name os)))) (default-/etc/hosts (operating-system-host-name os))))
("localtime" ,#~(string-append #$tzdata "/share/zoneinfo/" ("localtime" ,(file-append tzdata "/share/zoneinfo/"
#$(operating-system-timezone os))) (operating-system-timezone os)))
("sudoers" ,(operating-system-sudoers-file os)))))) ("sudoers" ,(operating-system-sudoers-file os))))))
(define %root-account (define %root-account
@ -547,7 +547,7 @@ (define (operating-system-environment-variables os)
@var{session-environment-service-type}, to be used in @file{/etc/environment}." @var{session-environment-service-type}, to be used in @file{/etc/environment}."
`(("LANG" . ,(operating-system-locale os)) `(("LANG" . ,(operating-system-locale os))
("TZ" . ,(operating-system-timezone os)) ("TZ" . ,(operating-system-timezone os))
("TZDIR" . ,#~(string-append #$tzdata "/share/zoneinfo")) ("TZDIR" . ,(file-append tzdata "/share/zoneinfo"))
;; Tell 'modprobe' & co. where to look for modules. ;; Tell 'modprobe' & co. where to look for modules.
("LINUX_MODULE_DIRECTORY" . "/run/booted-system/kernel/lib/modules") ("LINUX_MODULE_DIRECTORY" . "/run/booted-system/kernel/lib/modules")
;; These variables are honored by OpenSSL (libssl) and Git. ;; These variables are honored by OpenSSL (libssl) and Git.
@ -571,12 +571,12 @@ (define (operating-system-environment-variables os)
(define %setuid-programs (define %setuid-programs
;; Default set of setuid-root programs. ;; Default set of setuid-root programs.
(let ((shadow (@ (gnu packages admin) shadow))) (let ((shadow (@ (gnu packages admin) shadow)))
(list #~(string-append #$shadow "/bin/passwd") (list (file-append shadow "/bin/passwd")
#~(string-append #$shadow "/bin/su") (file-append shadow "/bin/su")
#~(string-append #$inetutils "/bin/ping") (file-append inetutils "/bin/ping")
#~(string-append #$inetutils "/bin/ping6") (file-append inetutils "/bin/ping6")
#~(string-append #$sudo "/bin/sudo") (file-append sudo "/bin/sudo")
#~(string-append #$fuse "/bin/fusermount")))) (file-append fuse "/bin/fusermount"))))
(define %sudoers-specification (define %sudoers-specification
;; Default /etc/sudoers contents: 'root' and all members of the 'wheel' ;; Default /etc/sudoers contents: 'root' and all members of the 'wheel'