all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Guix Paths
@ 2020-09-21  1:32 Buttery Pancake
  2020-09-21  8:33 ` Andreas Enge
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Buttery Pancake @ 2020-09-21  1:32 UTC (permalink / raw)
  To: guix-devel@gnu.org

[-- Attachment #1: Type: text/plain, Size: 463 bytes --]

I was looking at a NixCon 2019 session called "Guix from the Nix Perspective" (https://www.youtube.com/watch?v=bDGzCXr6VYU).

I am wondering why Guix chose `/var/guix` path instead of `/gnu/var/guix` or `/guix/var/guix`, as Nix uses `/nix/var/nix`?

I do think that having only one or two directories under root, `/gnu` and/or `/guix` is better, instead of having Guix related files under multiple directories (/var, /run etc.). It will be neat, clean and unique.

[-- Attachment #2: Type: text/html, Size: 592 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Guix Paths
  2020-09-21  1:32 Guix Paths Buttery Pancake
@ 2020-09-21  8:33 ` Andreas Enge
  2020-09-21  9:06 ` Tobias Geerinckx-Rice
  2020-09-21  9:13 ` Ricardo Wurmus
  2 siblings, 0 replies; 6+ messages in thread
From: Andreas Enge @ 2020-09-21  8:33 UTC (permalink / raw)
  To: Buttery Pancake; +Cc: guix-devel@gnu.org

Hello,

On Mon, Sep 21, 2020 at 01:32:52AM +0000, Buttery Pancake wrote:
> I am wondering why Guix chose `/var/guix` path instead of `/gnu/var/guix` or `/
> guix/var/guix`, as Nix uses `/nix/var/nix`?
> I do think that having only one or two directories under root, `/gnu` and/or `/
> guix` is better, instead of having Guix related files under multiple
> directories (/var, /run etc.). It will be neat, clean and unique.

I agree especially with the problem that the store database is usually
saved under /var/guix/db - it would be much nicer if the store could be
copied over from one machine to another simply by copying one directory.
But that could also be solved by moving just the database to /gnu/store/db,
I suppose.

In a similar vein, it is annoying to have to use "--localstatedir=/var"
when configuring. The default configuration should simply be, well, the
default... And then it might as well be /gnu, too.

Andreas



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Guix Paths
  2020-09-21  1:32 Guix Paths Buttery Pancake
  2020-09-21  8:33 ` Andreas Enge
@ 2020-09-21  9:06 ` Tobias Geerinckx-Rice
  2020-09-21  9:13 ` Ricardo Wurmus
  2 siblings, 0 replies; 6+ messages in thread
From: Tobias Geerinckx-Rice @ 2020-09-21  9:06 UTC (permalink / raw)
  To: Buttery Pancake; +Cc: guix-devel

Pancake,

On 2020-09-21 3:32, Buttery Pancake wrote:
> I was looking at a NixCon 2019 session called "Guix from the Nix 
> Perspective" (https://www.youtube.com/watch?v=bDGzCXr6VYU).

Bookmarked, thanks!

> I am wondering why Guix chose `/var/guix` path instead of 
> `/gnu/var/guix` or `/guix/var/guix`, as Nix uses `/nix/var/nix`?

Only Ludo' can answer this, but I think it's an attempt to follow 
FHS/GNU directory standards.  Similar to how --localstatedir is wrong by 
default.

I considered it a bike shed until recently, when I first heard of people 
putting /gnu and /var on separate btrfs subvolumes for snapshotting.  A 
bad idea on most distributions, of course, but Guix's database and store 
really are one unit -- like data and metadata.  If your database gets 
corrupted, lost, or significantly out of sync, Guix will happily delete 
store items to match it, up to and including the last glibc.  Ask me how 
I know.

> I do think that having only one or two directories under root, `/gnu` 
> and/or `/guix` is better, instead of having Guix related files under 
> multiple directories (/var, /run etc.). It will be neat, clean and 
> unique.

Moving the database to /gnu makes sense, but the rest of /var/guix 
belongs in /var.  Same for /run: it's the right place for what's there.  
Don't let's reinvent the FHS poorly under /gnu.  It's already pretty 
neat, and we're already unique.

Kind regards,

T G-R

Sent from a Web browser. Excuse or enjoy my brevity.


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Guix Paths
  2020-09-21  1:32 Guix Paths Buttery Pancake
  2020-09-21  8:33 ` Andreas Enge
  2020-09-21  9:06 ` Tobias Geerinckx-Rice
@ 2020-09-21  9:13 ` Ricardo Wurmus
  2020-09-21 14:45   ` Buttery Pancake
  2 siblings, 1 reply; 6+ messages in thread
From: Ricardo Wurmus @ 2020-09-21  9:13 UTC (permalink / raw)
  To: Buttery Pancake; +Cc: guix-devel


> I am wondering why Guix chose `/var/guix` path instead of
> `/gnu/var/guix` or `/guix/var/guix`, as Nix uses `/nix/var/nix`?

I think there’s no better reason than to say that /var is the
conventional local state directory on GNU systems.

It’s possible to use /gnu/var/guix, of course; on the HPC cluster at the
MDC we use /gnu/var as the localstatedir, but it’s not as convenient as
it may seem, because that directory contains the profile directories,
which need to be user-writable, whereas the rest of /gnu only need to be
writable by the daemon.  This means that we end up mounting the same
directories more than once with different permissions.

Users can pick anything for the localstatedir during the configure step
and “guix pull” should respect that choice in the long term.

-- 
Ricardo


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Guix Paths
  2020-09-21  9:13 ` Ricardo Wurmus
@ 2020-09-21 14:45   ` Buttery Pancake
  2020-09-21 15:06     ` Tobias Geerinckx-Rice
  0 siblings, 1 reply; 6+ messages in thread
From: Buttery Pancake @ 2020-09-21 14:45 UTC (permalink / raw)
  To: Ricardo Wurmus; +Cc: guix-devel@gnu.org


> which need to be user-writable, whereas the rest of /gnu only need to be
> writable by the daemon. This means that we end up mounting the same
> directories more than once with different permissions.

Yes. As default, wouldn't it be better to use `/guix/guix-var-stuff` instead of `/var/guix/guix-var-stuff`? Also, bringing `/run/guix-other-stuff` under `/guix/guix-other-stuff`.

This way, `/gnu` and `/guix` will be unique and be easily tracked, backed-up, snap-shot, mounted-separately or won't interfere with other stuffs on file-system (like ever).


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Guix Paths
  2020-09-21 14:45   ` Buttery Pancake
@ 2020-09-21 15:06     ` Tobias Geerinckx-Rice
  0 siblings, 0 replies; 6+ messages in thread
From: Tobias Geerinckx-Rice @ 2020-09-21 15:06 UTC (permalink / raw)
  To: Buttery Pancake; +Cc: guix-devel

Hi!

On 2020-09-21 16:45, Buttery Pancake wrote:
>> which need to be user-writable, whereas the rest of /gnu only need to 
>> be
>> writable by the daemon. This means that we end up mounting the same
>> directories more than once with different permissions.
> 
> Yes. As default, wouldn't it be better to use `/guix/guix-var-stuff`
> instead of `/var/guix/guix-var-stuff`? Also, bringing
> `/run/guix-other-stuff` under `/guix/guix-other-stuff`.

/run is ephemeral: it is required to be a tmpfs on ‘modern’ system(d)s, 
and to be at least emptied at boot on others.  Thus nothing in it should 
ever be

> backed-up, snap-shot, [or] mounted-separately [more than it already is 
> today.]

As for

> won't interfere with other stuffs on file-system (like ever).

I don't think it interferes, does it?  How?

I think adding yet another non-standard / subdirectory should be done 
only for very good reason.  /gnu has it, so would moving to /gnu/db/, 
but I don't see a case for the others to be moved.

Kind regards,

T G-R

Sent from a Web browser. Excuse or enjoy my brevity.


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2020-09-21 15:06 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-09-21  1:32 Guix Paths Buttery Pancake
2020-09-21  8:33 ` Andreas Enge
2020-09-21  9:06 ` Tobias Geerinckx-Rice
2020-09-21  9:13 ` Ricardo Wurmus
2020-09-21 14:45   ` Buttery Pancake
2020-09-21 15:06     ` Tobias Geerinckx-Rice

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.