summaryrefslogtreecommitdiff
path: root/gnu/services
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2017-09-21 23:52:45 +0200
committerLudovic Courtès <ludo@gnu.org>2017-09-22 00:05:08 +0200
commitfbc31dc1247d3a494246e69f3cf28476af9eb9d6 (patch)
tree6d84652594ea43264c798e35dd6045894f7417f9 /gnu/services
parentdb4e8fd5d4a07d3be8ce68fb96722ef7077c0eee (diff)
services: Move 'session-environment-service-type' to pam.scm.
* gnu/services/base.scm (environment-variables->environment-file) (session-environment-service-type) (session-environment-service): Move to... * gnu/system/pam.scm: ... here.
Diffstat (limited to 'gnu/services')
-rw-r--r--gnu/services/base.scm43
1 files changed, 0 insertions, 43 deletions
diff --git a/gnu/services/base.scm b/gnu/services/base.scm
index 10c8f1b6a3..64620a9b0a 100644
--- a/gnu/services/base.scm
+++ b/gnu/services/base.scm
@@ -59,8 +59,6 @@
user-unmount-service
swap-service
user-processes-service
- session-environment-service
- session-environment-service-type
host-name-service
console-keymap-service
%default-console-font
@@ -600,47 +598,6 @@ to add @var{device} to the kernel's entropy pool. The service will fail if
(rng-tools rng-tools)
(device device))))
-
-;;;
-;;; System-wide environment variables.
-;;;
-
-(define (environment-variables->environment-file vars)
- "Return a file for pam_env(8) that contains environment variables VARS."
- (apply mixed-text-file "environment"
- (append-map (match-lambda
- ((key . value)
- (list key "=" value "\n")))
- vars)))
-
-(define session-environment-service-type
- (service-type
- (name 'session-environment)
- (extensions
- (list (service-extension
- etc-service-type
- (lambda (vars)
- (list `("environment"
- ,(environment-variables->environment-file vars)))))))
- (compose concatenate)
- (extend append)
- (description
- "Populate @file{/etc/environment} with the specified environment
-variables. The value of this service is a list of name/value pairs for
-environments variables, such as:
-
-@example
-'((\"TZ\" . \"Canada/Pacific\"))
-@end example\n")))
-
-(define (session-environment-service vars)
- "Return a service that builds the @file{/etc/environment}, which can be read
-by PAM-aware applications to set environment variables for sessions.
-
-VARS should be an association list in which both the keys and the values are
-strings or string-valued gexps."
- (service session-environment-service-type vars))
-
;;;
;;; Console & co.