From mboxrd@z Thu Jan 1 00:00:00 1970 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 Message-ID: <20200326101032.50ba3d9c@mailbox.org> References: <20200319193123.40d51798@mailbox.org> <20200320014155.GA30652@jasmine.lan> <20200320231457.520bf473@mailbox.org> <20200322221210.GA20590@jasmine.lan> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:50111) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jHU9e-0008To-2U for help-guix@gnu.org; Thu, 26 Mar 2020 11:10:47 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jHU9c-0006m1-R1 for help-guix@gnu.org; Thu, 26 Mar 2020 11:10:45 -0400 Received: from mout-p-102.mailbox.org ([80.241.56.152]:50198) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1jHU9c-0006kI-Bt for help-guix@gnu.org; Thu, 26 Mar 2020 11:10:44 -0400 In-Reply-To: <20200322221210.GA20590@jasmine.lan> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-guix-bounces+gcggh-help-guix=m.gmane-mx.org@gnu.org Sender: "Help-Guix" To: Leo Famulari Cc: "help-guix@gnu.org" On Sun, 22 Mar 2020 18:12:10 -0400 Leo Famulari 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* > > ...... > > data-drive > > (file-system > (device (%tmp-directory)) > (mount-point "/tmp") > (type "none") > (flags '(bind-mount)) > (dependencies (list data-drive)) > ) > > %base-file-systems))