unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
From: Gary Johnson <lambdatronic@disroot.org>
To: Nathan Dehnel <ncdehnel@gmail.com>
Cc: Leo Famulari <leo@famulari.name>, help-guix@gnu.org
Subject: Re: How to put a file in /gnu/store and set its permissions
Date: Sun, 05 Dec 2021 21:30:09 -0500	[thread overview]
Message-ID: <874k7mihb6.fsf@disroot.org> (raw)
In-Reply-To: <CAEEhgEvX7H9PHLUGwnp0zE2eGxEBzny7TY89jVf7Yo2MMLDA0g@mail.gmail.com>

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


  reply	other threads:[~2021-12-06  2:44 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 [this message]
2021-12-08  0:59       ` Nathan Dehnel
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=874k7mihb6.fsf@disroot.org \
    --to=lambdatronic@disroot.org \
    --cc=help-guix@gnu.org \
    --cc=leo@famulari.name \
    --cc=ncdehnel@gmail.com \
    /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).