From: Tanguy LE CARROUR <tanguy@bioneland.org>
To: guix-devel@gnu.org
Subject: Contributing Guix Home services
Date: Sat, 25 Mar 2023 17:53:23 +0100 [thread overview]
Message-ID: <167976320326.6475.15093558555393216956@localhost> (raw)
Hi Guix,
For the past few… months (!?) I've been working on migrating from
git+stow to a proper Guix Home setup.
It's been painful, but I've learned a lot along the way. There's still
a lot to be done —and a lot to learn!—, but I wanted to know
what were the requirements for a home service to be accepted in master?
I've written home services for the following programs: afew, bat, beets, dunst,
gnupg, imv, khal, khard, mpd, msmtp, nowty, profanity, swappy, tig, tor,
transmission, user-dirs, vdirsyncer, wofi, zathura. Others are on the way.
For the time being, they are available on my channel:
<https://git.easter-eggs.org/bioneland/guix/-/tree/main/bioneland/home/services>.
Most of them are about writing configuration files. But I've limited myself
to the configuration options I was actually using. So they are far from
being complete. But it's kind of cool to be able to write:
```scheme
(define move-left "t")
(define move-up "s")
(define move-down "r")
(define move-right "n")
;; […]
(service home-imv-service-type
(home-imv-configuration
(prev move-left)
(next move-right)
(zoom-in move-up)
(zoom-out move-down)))
(service home-khal-service-type
(home-khal-configuration
(up move-up)
(down move-down)
(left move-left)
(right move-right)))
```
My main concern now is to figure out how to implement complexe
configurations to be able to write things like:
```scheme
(service home-khal-service-type
(home-khal-configuration
(calendars
(list (khal-calendar (name "my_calendar")
(path "~/.calendars/xxxx/")
(color "light gray"))))))
(service home-khard-service-type
(home-khard-configuration
(addressbooks
(list (khard-addresbook (name "my_contact")
(path "~/.contacts/xxxx/"))))))
(service home-msmtp-service-type
(home-msmtp-configuration
(default-account "t@bl")
(accounts
(list (msmtp-account (name "t@bl")
(host "mail.domain.tld")
(port 587)
(user "tanguy@bioneland.net")
(from "tanguy@bioneland.net"))))))
```
I'm not sure how to make `define-configuration` accept complexe structures.
When I look at `gnu/home/services/ssh.scm`, it seems to be doing the other way
around and define the configuration with `define-record-type` and "put"
the "configuration" inside.
Any guidance would be highly appreciated!
Best regards,
--
Tanguy
next reply other threads:[~2023-03-25 16:53 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-25 16:53 Tanguy LE CARROUR [this message]
2023-04-04 7:45 ` Contributing Guix Home services Tanguy LE CARROUR
2023-04-13 20:42 ` Ludovic Courtès
2023-04-14 12:03 ` Tanguy LE CARROUR
2023-04-17 13:39 ` Ludovic Courtès
2023-04-20 15:28 ` Tanguy LE CARROUR
2023-05-03 20:42 ` Ludovic Courtès
2023-05-17 7:16 ` Tanguy LE CARROUR
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
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=167976320326.6475.15093558555393216956@localhost \
--to=tanguy@bioneland.org \
--cc=guix-devel@gnu.org \
/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 public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).