unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Contributing Guix Home services
@ 2023-03-25 16:53 Tanguy LE CARROUR
  2023-04-04  7:45 ` Tanguy LE CARROUR
  0 siblings, 1 reply; 8+ messages in thread
From: Tanguy LE CARROUR @ 2023-03-25 16:53 UTC (permalink / raw)
  To: guix-devel

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


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2023-05-17  7:17 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-03-25 16:53 Contributing Guix Home services Tanguy LE CARROUR
2023-04-04  7:45 ` 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

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).