From: Jelle Licht <jlicht@fsfe.org>
To: Elias Kueny <elias.kueny@posteo.net>, help-guix@gnu.org
Subject: Re: Running a shell command with home-run-on-change-service-type
Date: Tue, 20 Dec 2022 11:12:51 +0100 [thread overview]
Message-ID: <87zgbiwfh8.fsf@fsfe.org> (raw)
In-Reply-To: <87pmcfgpc9.fsf@posteo.net>
Elias Kueny <elias.kueny@posteo.net> writes:
Hello Elias!
Buyer beware; I am not a G-expression guru. Having said that...
> Hello,
>
> I'm trying to extend the home-run-on-change-service-type service to run the fish command "fisher update" when the file ~/.config/fish/fish_plugins changed, so that fisher plugins are installed or removed by guix home reconfigure.
>
> My service definitions are:
>
>> (define-module (modules shells)
>> #:use-module (guix gexp)
>> #:use-module (gnu packages)
>> #:use-module (gnu services)
>> #:use-module (gnu home services)
>> #:use-module (gnu home services shells))
>>
>> (define-public fish-services
>> (list
>> (simple-service 'fisher-update-on-change
>> home-run-on-change-service-type
>> `(("files/.config/fish/fish_plugins"
>> #~(system* #$(file-append fish "/bin/fish") "-c" "fisher update"))))
... here you quasi-quote the service extension configuration with
"`". To make use of a gexp in the expression, we need to unquote the gexp
expression, so replace "#~" by ",#~".
HTH and gets you unstuck!
- Jelle
next prev parent reply other threads:[~2022-12-20 10:14 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-19 18:46 Running a shell command with home-run-on-change-service-type Elias Kueny
2022-12-20 10:12 ` Jelle Licht [this message]
2022-12-20 18:16 ` Elias Kueny
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=87zgbiwfh8.fsf@fsfe.org \
--to=jlicht@fsfe.org \
--cc=elias.kueny@posteo.net \
--cc=help-guix@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.
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).