From: "Ludovic Courtès" <ludo@gnu.org>
To: Lars Rustand <rustand.lars@gmail.com>
Cc: 68589@debbugs.gnu.org
Subject: [bug#68589] [PATCH] Add guix-home-service-type
Date: Sat, 10 Feb 2024 22:30:35 +0100 [thread overview]
Message-ID: <877cjchuro.fsf@gnu.org> (raw)
In-Reply-To: <87wms5e6ym.fsf@yoga.mail-host-address-is-not-set> (Lars Rustand's message of "Fri, 19 Jan 2024 15:12:13 +0100")
Hi Lars,
Lars Rustand <rustand.lars@gmail.com> skribis:
> Hoping to upstream this nice service from RDE. This service allows to
> embed a home environment in a operating-system declaration.
>
> Original source: https://git.sr.ht/~abcdw/rde/tree/master/item/src/gnu/services/home.scm
>
> Change-Id: I42976cae9dd1580dc07dc866cd851294c7921725
This would be much welcome!
> +++ b/gnu/services/home.scm
> @@ -0,0 +1,47 @@
> +(define-module (gnu services home)
Could you add a header similar to that found in other files?
Since this is copied from rde, make sure to preserve their copyright
notices.
> +(define (guix-home-shepherd-service config)
> + (map
> + (lambda (x)
> + (let ((user (car x))
> + (he (cdr x)))
In Guix we’d use ‘match’ instead of ‘car’ + ‘cdr’:
https://guix.gnu.org/manual/devel/en/html_node/Data-Types-and-Pattern-Matching.html
But perhaps we could just as well define a <guix-home-configuration>
record or similar?
> +(define (guix-home-gc-roots config)
> + (map cdr config))
Unused.
> +(define guix-home-service-type
> + (service-type
> + (name 'guix-home)
> + (description "Setups home-environments specified in the value.")
“Sets up Guix Home for the specified user accounts.”
> + (extensions (list (service-extension
> + shepherd-root-service-type
> + guix-home-shepherd-service)))
> + ;; (compose append)
> + ;; (extend append)
Why comment it out?
Also make sure to register the file in ‘gnu/local.mk’.
Last, we usually require a test for system services; you can find them
in gnu/tests/*.scm. Could you try and write one? It would check for
instance that the user’s shepherd is indeed started.
Could you send an updated patch?
Thanks,
Ludo’.
next prev parent reply other threads:[~2024-02-10 21:32 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-19 14:12 [bug#68589] [PATCH] Add guix-home-service-type Lars Rustand
2024-02-10 21:30 ` Ludovic Courtès [this message]
2024-03-25 23:12 ` Richard Sent
2024-04-29 10:16 ` bug#68589: " Ludovic Courtès
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=877cjchuro.fsf@gnu.org \
--to=ludo@gnu.org \
--cc=68589@debbugs.gnu.org \
--cc=rustand.lars@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.