From: Nathan Dehnel <ncdehnel@gmail.com>
To: Gary Johnson <lambdatronic@disroot.org>
Cc: help-guix@gnu.org
Subject: Re: How to put a file in /gnu/store and set its permissions
Date: Tue, 7 Dec 2021 18:59:31 -0600 [thread overview]
Message-ID: <CAEEhgEvt9N_1gDr_6t6_C+pFOfmap2P0KCk1pD29GC3mBqY8hQ@mail.gmail.com> (raw)
In-Reply-To: <874k7mihb6.fsf@disroot.org>
Thanks. Though that code causes "guix system: error: symlink: File
exists: "/etc/ssh"" when I use it, and by the looks of it, would still
be putting the key in the store, which is insecure.
On Sun, Dec 5, 2021 at 8:44 PM Gary Johnson <lambdatronic@disroot.org> wrote:
>
> Nathan Dehnel <ncdehnel@gmail.com> writes:
>
> > Thanks. I guess then I need to know how to put a file in /etc/ssh
> > without putting it in the store.
>
> To programmatically add a file to /etc, you can extend the
> etc-service-type in your operating-system's services field like so:
>
> ```
> (use-modules
> ((gnu services) #:select (simple-service etc-service-type))
> ((gnu services desktop) #:select (%desktop-services))
> ((gnu system) #:select (operating-system))
> ((guix gexp) #:select (local-file)))
>
> (define guixrig_host_rsa_key
> (local-file "ssh/guixrig_host_rsa_key" #:recursive? #t))
>
> (operating-system
> ...
> (services (cons* (simple-service 'my-secret-service etc-service-type
> `(("ssh/guixrig_host_rsa_key" ,guixrig_host_rsa_key)))
> %desktop-services)))
> ```
>
> Have fun and happy hacking!
> ~Gary
>
> --
> GPG Key ID: 7BC158ED
> Use `gpg --search-keys lambdatronic' to find me
> Protect yourself from surveillance: https://emailselfdefense.fsf.org
> =======================================================================
> () ascii ribbon campaign - against html e-mail
> /\ www.asciiribbon.org - against proprietary attachments
>
> Why is HTML email a security nightmare? See https://useplaintext.email/
>
> Please avoid sending me MS-Office attachments.
> See http://www.gnu.org/philosophy/no-word-attachments.html
next prev parent reply other threads:[~2021-12-08 1:00 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-04 22:47 How to put a file in /gnu/store and set its permissions Nathan Dehnel
2021-12-05 5:12 ` Leo Famulari
2021-12-05 21:18 ` Nathan Dehnel
2021-12-06 2:30 ` Gary Johnson
2021-12-08 0:59 ` Nathan Dehnel [this message]
2021-12-08 6:02 ` Arun Isaac
2021-12-08 16:26 ` Gary Johnson
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=CAEEhgEvt9N_1gDr_6t6_C+pFOfmap2P0KCk1pD29GC3mBqY8hQ@mail.gmail.com \
--to=ncdehnel@gmail.com \
--cc=help-guix@gnu.org \
--cc=lambdatronic@disroot.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).