[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How to declare a bind mount in the "file-systems" definition?
From: |
Gábor Boskovits |
Subject: |
Re: How to declare a bind mount in the "file-systems" definition? |
Date: |
Sun, 29 Mar 2020 11:36:57 +0200 |
Hello,
I am glad that this finally worked!
Matthew Brooks <address@hidden> ezt írta (időpont: 2020.
márc. 26., Cs, 16:11):
>
> On Sun, 22 Mar 2020 18:12:10 -0400
> Leo Famulari <address@hidden> 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))
>
Could you consider adding an example to the cookbook?
I believe that would be a great addition.
Best regards,
g_bor
--
OpenPGP Key Fingerprint: 7988:3B9F:7D6A:4DBF:3719:0367:2506:A96C:CF63:0B21