diff options
author | Ludovic Courtès <ludo@gnu.org> | 2021-11-14 23:06:49 +0100 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2021-11-14 23:18:08 +0100 |
commit | 4dcec60fa6a93dbc93bef2cdb91e3633c705579e (patch) | |
tree | bfd9d0ac280d5a0bbdf764b339f18c1b32feaec3 /gnu/home | |
parent | a8b5b40f62e8907b0e82c5088a8fb647d05a7737 (diff) |
home-services: Demonadify 'on-first-login' handling.
* gnu/home/services.scm (compute-on-first-login-script): Use
'computed-file' instead of' gexp->script'.
(on-first-login-script-entry): Expect a regular value rather than a
monadic value and remove 'mlet'.
Diffstat (limited to 'gnu/home')
-rw-r--r-- | gnu/home/services.scm | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/gnu/home/services.scm b/gnu/home/services.scm index 1e295b6afe..df1a3a19e2 100644 --- a/gnu/home/services.scm +++ b/gnu/home/services.scm @@ -275,7 +275,7 @@ directory containing FILES." will be put in @file{~/.guix-home/files}."))) (define (compute-on-first-login-script _ gexps) - (gexp->script + (computed-file "on-first-login" #~(let* ((xdg-runtime-dir (or (getenv "XDG_RUNTIME_DIR") (format #f "/run/user/~a" (getuid)))) @@ -294,11 +294,11 @@ won't execute anything. You can check if xdg runtime directory exists, XDG_RUNTIME_DIR variable is set to apropriate value and manually execute the script by running '$HOME/.guix-home/on-first-login'"))))) -(define (on-first-login-script-entry m-on-first-login) +(define (on-first-login-script-entry on-first-login) "Return, as a monadic value, an entry for the on-first-login script in the home environment directory." - (mlet %store-monad ((on-first-login m-on-first-login)) - (return `(("on-first-login" ,on-first-login))))) + (with-monad %store-monad + (return `(("on-first-login" ,on-first-login))))) (define home-run-on-first-login-service-type (service-type (name 'home-run-on-first-login) |