help-guix
[Top][All Lists]
Advanced

[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: Matthew Brooks
Subject: Re: How to declare a bind mount in the "file-systems" definition?
Date: Thu, 26 Mar 2020 10:10:32 -0500

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))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]