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)
(comment "Avahi daemon user")
(home-directory "/var/empty")
(shell #~(string-append #$shadow "/sbin/nologin")))))
(shell (file-append shadow "/sbin/nologin")))))
(define %avahi-activation
;; Activation gexp.

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -67,7 +67,7 @@ (define %nginx-accounts
(system? #t)
(comment "nginx server user")
(home-directory "/var/empty")
(shell #~(string-append #$shadow "/sbin/nologin")))))
(shell (file-append shadow "/sbin/nologin")))))
(define nginx-activation
(match-lambda
@ -86,7 +86,7 @@ (define nginx-activation
(define nginx-shepherd-service
(match-lambda
(($ <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
(lambda args
#~(lambda _

View file

@ -267,7 +267,7 @@ (define (exec-from-login-shell command . args)
(define %default-slim-theme
;; Theme based on work by Felipe López.
#~(string-append #$%artwork-repository "/slim"))
(file-append %artwork-repository "/slim"))
(define %default-slim-theme-name
;; 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-name %default-slim-theme-name)
(xauth xauth) (shepherd shepherd) (bash bash)
(auto-login-session #~(string-append #$windowmaker
"/bin/wmaker"))
(auto-login-session (file-append windowmaker
"/bin/wmaker"))
(startx (xorg-start-command)))
"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
@ -450,14 +450,13 @@ (define* (screen-locker-service package
for it. For example:
@lisp
(screen-locker-service xlockmore \"xlock\")
(screen-locker-service xlockmore \"xlock\")
@end lisp
makes the good ol' XlockMore usable."
(service screen-locker-service-type
(screen-locker program
#~(string-append #$package
#$(string-append "/bin/" program))
(file-append package "/bin/" program)
allow-empty-passwords?)))
;;; 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
fi\n")))
(etc-service
`(("services" ,#~(string-append #$net-base "/etc/services"))
("protocols" ,#~(string-append #$net-base "/etc/protocols"))
("rpc" ,#~(string-append #$net-base "/etc/rpc"))
`(("services" ,(file-append net-base "/etc/services"))
("protocols" ,(file-append net-base "/etc/protocols"))
("rpc" ,(file-append net-base "/etc/rpc"))
("login.defs" ,#~#$login.defs)
("issue" ,#~#$issue)
("nsswitch.conf" ,#~#$nsswitch)
@ -482,8 +482,8 @@ (define* (operating-system-etc-service os)
("bashrc" ,#~#$bashrc)
("hosts" ,#~#$(or (operating-system-hosts-file os)
(default-/etc/hosts (operating-system-host-name os))))
("localtime" ,#~(string-append #$tzdata "/share/zoneinfo/"
#$(operating-system-timezone os)))
("localtime" ,(file-append tzdata "/share/zoneinfo/"
(operating-system-timezone os)))
("sudoers" ,(operating-system-sudoers-file os))))))
(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}."
`(("LANG" . ,(operating-system-locale 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.
("LINUX_MODULE_DIRECTORY" . "/run/booted-system/kernel/lib/modules")
;; These variables are honored by OpenSSL (libssl) and Git.
@ -571,12 +571,12 @@ (define (operating-system-environment-variables os)
(define %setuid-programs
;; Default set of setuid-root programs.
(let ((shadow (@ (gnu packages admin) shadow)))
(list #~(string-append #$shadow "/bin/passwd")
#~(string-append #$shadow "/bin/su")
#~(string-append #$inetutils "/bin/ping")
#~(string-append #$inetutils "/bin/ping6")
#~(string-append #$sudo "/bin/sudo")
#~(string-append #$fuse "/bin/fusermount"))))
(list (file-append shadow "/bin/passwd")
(file-append shadow "/bin/su")
(file-append inetutils "/bin/ping")
(file-append inetutils "/bin/ping6")
(file-append sudo "/bin/sudo")
(file-append fuse "/bin/fusermount"))))
(define %sudoers-specification
;; Default /etc/sudoers contents: 'root' and all members of the 'wheel'