unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
From: Reza Housseini <reza.housseini@gmail.com>
To: help-guix@gnu.org
Subject: Run a system command in home configuration file
Date: Fri, 25 Feb 2022 11:08:23 +0100	[thread overview]
Message-ID: <CAGZc64GstfCeoatRXeMvB-38gHNbyEFRb7ZTeZKUbjxcJ60Jrg@mail.gmail.com> (raw)

Hello guix

I want to run a system command and use the output inside my ssh config
file. Below is the service configuration I'm talking about and my current
implementation which does not work, probably because the command is run
from the daemon, but I need it to run from the current user. Has anyone an
idea how to achieve this?

(simple-service 'ssh-config
 home-files-service-type
 (list `("ssh/config"
 ,(mixed-text-file "config" "
Host *
  IdentityAgent " #~(system* #$(file-append gnupg "/bin/gpgconf")
"--list-dirs" "agent-ssh-socket") "
"))))

Thanks and cheers,
Reza

             reply	other threads:[~2022-02-25 11:06 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-25 10:08 Reza Housseini [this message]
2022-03-08 10:33 ` Run a system command in home configuration file Ludovic Courtès
2022-03-08 14:38   ` Reza Housseini
2022-03-09  7:37     ` Efraim Flashner

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=CAGZc64GstfCeoatRXeMvB-38gHNbyEFRb7ZTeZKUbjxcJ60Jrg@mail.gmail.com \
    --to=reza.housseini@gmail.com \
    --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).