@@ -39,6 +39,7 @@ (define-module (gnu services)
#:use-module (guix modules)
#:use-module (guix packages)
#:use-module (guix utils)
+ #:use-module (guix deprecation)
#:use-module (gnu packages base)
#:use-module (gnu packages bash)
#:use-module (gnu packages hurd)
@@ -122,7 +123,7 @@ (define-module (gnu services)
%boot-service
%activation-service
- etc-service)
+ etc-service) ; deprecated
#:re-export (;; Note: Re-export 'delete' to allow for proper syntax matching
;; in 'modify-services' forms. See
;; <https://debbugs.gnu.org/cgi/bugreport.cgi?bug=26805#16>.
@@ -804,7 +805,8 @@ (define etc-service-type
(extend append)
(description "Populate the @file{/etc} directory.")))
-(define (etc-service files)
+(define-deprecated (etc-service files)
+ etc-service-type
"Return a new service of ETC-SERVICE-TYPE that populates /etc with FILES.
FILES must be a list of name/file-like object pairs."
(service etc-service-type files))
@@ -1092,40 +1092,40 @@ (define* (operating-system-etc-service os)
# as those in ~/.guix-profile and /run/current-system/profile.
source /run/current-system/profile/etc/profile.d/bash_completion.sh
fi\n")))
- (etc-service
- `(("os-release" ,#~#$(os-release))
- ("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)
- ,@(if nsswitch `(("nsswitch.conf" ,#~#$nsswitch)) '())
- ("profile" ,#~#$profile)
- ("bashrc" ,#~#$bashrc)
- ;; Write the operating-system-host-name to /etc/hostname to prevent
- ;; NetworkManager from changing the system's hostname when connecting
- ;; to certain networks. Some discussion at
- ;; https://lists.gnu.org/archive/html/help-guix/2017-09/msg00037.html
- ("hostname" ,(plain-file "hostname" (operating-system-host-name os)))
- ;; Some programs (e.g., GLib) look at /etc/timezone to find the
- ;; name of the current timezone. For details, see
- ;; https://lists.gnu.org/archive/html/guix-devel/2019-07/msg00166.html
- ;; Some programs expect a terminating newline.
- ("timezone" ,(plain-file "timezone"
- (string-append
- (string-trim-both
- (operating-system-timezone os))
- "\n")))
- ("localtime" ,(file-append tzdata "/share/zoneinfo/"
- (operating-system-timezone os)))
- ,@(if sudoers
- `(("sudoers" ,(validated-sudoers-file sudoers)))
- '())
- ,@(if hurd
- `(("login" ,(file-append hurd "/etc/login"))
- ("motd" ,(file-append hurd "/etc/motd"))
- ("ttys" ,(file-append hurd "/etc/ttys")))
- '())))))
+ (service etc-service-type
+ `(("os-release" ,#~#$(os-release))
+ ("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)
+ ,@(if nsswitch `(("nsswitch.conf" ,#~#$nsswitch)) '())
+ ("profile" ,#~#$profile)
+ ("bashrc" ,#~#$bashrc)
+ ;; Write the operating-system-host-name to /etc/hostname to prevent
+ ;; NetworkManager from changing the system's hostname when connecting
+ ;; to certain networks. Some discussion at
+ ;; https://lists.gnu.org/archive/html/help-guix/2017-09/msg00037.html
+ ("hostname" ,(plain-file "hostname" (operating-system-host-name os)))
+ ;; Some programs (e.g., GLib) look at /etc/timezone to find the
+ ;; name of the current timezone. For details, see
+ ;; https://lists.gnu.org/archive/html/guix-devel/2019-07/msg00166.html
+ ;; Some programs expect a terminating newline.
+ ("timezone" ,(plain-file "timezone"
+ (string-append
+ (string-trim-both
+ (operating-system-timezone os))
+ "\n")))
+ ("localtime" ,(file-append tzdata "/share/zoneinfo/"
+ (operating-system-timezone os)))
+ ,@(if sudoers
+ `(("sudoers" ,(validated-sudoers-file sudoers)))
+ '())
+ ,@(if hurd
+ `(("login" ,(file-append hurd "/etc/login"))
+ ("motd" ,(file-append hurd "/etc/motd"))
+ ("ttys" ,(file-append hurd "/etc/ttys")))
+ '())))))
(define %root-account
;; Default root account.