unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
From: Matthew Brooks <matthewfbrooks@mailbox.org>
To: Leo Famulari <leo@famulari.name>
Cc: "help-guix@gnu.org" <help-guix@gnu.org>
Subject: Re: How to declare a bind mount in the "file-systems" definition?
Date: Thu, 26 Mar 2020 10:10:32 -0500	[thread overview]
Message-ID: <20200326101032.50ba3d9c@mailbox.org> (raw)
In-Reply-To: <20200322221210.GA20590@jasmine.lan>

On Sun, 22 Mar 2020 18:12:10 -0400
Leo Famulari <leo@famulari.name> wrote:

> Looking in the manual for mentions of bind-mount I found the
> documentation of %immutable-store, which is a bind-mounted filesystem
> that exists by default in Guix System. It's implemented in
> 'gnu/systems/file-systems.scm' and hopefully provides a helpful example:
> 
> https://git.savannah.gnu.org/cgit/guix.git/tree/gnu/system/file-systems.scm?h=v1.0.1#n346

Thanks! I was able to get it working from that example!

For anyone else in the future who might want the info, here's what I did:

first I had to define these two things before the operating system section:

>(define data-drive
>   (file-system
>    (device (uuid "UUID goes here"))
>    (mount-point "/path-to-spinning-disk-goes-here")
>    (type "ext4")))
>
>(define (%tmp-directory) "/path-to-spinning-disk-goes-here/tmp")

Then, in the file-systems list I added the following:

>(file-systems (cons*
>
>                ...<other drives omitted for clarity>...
>
>                data-drive
>
>                (file-system
>                 (device (%tmp-directory))
>                 (mount-point "/tmp")
>                 (type "none")
>                 (flags '(bind-mount))
>                 (dependencies (list data-drive))
>                 )
>
>                %base-file-systems))

  reply	other threads:[~2020-03-26 15:10 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-20  0:31 How to declare a bind mount in the "file-systems" definition? Matthew Brooks
2020-03-20  1:41 ` Leo Famulari
2020-03-21  4:14   ` Matthew Brooks
2020-03-22 22:12     ` Leo Famulari
2020-03-26 15:10       ` Matthew Brooks [this message]
2020-03-29  9:36         ` Gábor Boskovits
2020-03-29 20:01           ` Matthew Brooks
2020-04-08 16:52             ` Leo Famulari
2020-04-22 17:03               ` Matthew Brooks
2020-04-22 19:52                 ` Leo Famulari

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=20200326101032.50ba3d9c@mailbox.org \
    --to=matthewfbrooks@mailbox.org \
    --cc=help-guix@gnu.org \
    --cc=leo@famulari.name \
    /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).