News for hackers. Stuff that matters.
Re:Fedora 40 Plans To Unify /usr/bin and /usr/sbin by RamRodification on Sunday December 24, 2023 @05:08PM (#38757416)
Why? (I'm clueless about NixOS. I think it's a way of declaring your whole Linux install as some kind of recipe file or something?)
Re:Fedora 40 Plans To Unify /usr/bin and /usr/sbin by jiehong on Sunday December 24, 2023 @05:25PM (#38757588)
> In NixOS however /lib and /usr/lib do not exist. Instead all system libraries, binaries, kernels, firmware and configuration files are placed in the Nix store. The files and directories in /nix/store are named by hashes of the information describing the built data. All of the files and directories placed in the Nix store are immutable. /bin and /usr/bin are almost absent: they contain only /bin/sh and /usr/bin/env respectively, to provide minimal compatibility with existing scripts using shebang lines. User-level environments are implemented using a large number of symbolic links to all required packages and auxiliary files. These environments are called profiles and are stored in /nix/var/nix/profiles, each user having their own profiles. Structuring the system in this way is how NixOS obtains its key advantages over conventional Linux distributions, such as atomicity and rollback support.

Source: https://nixos.wiki/wiki/Overview_of_the_NixOS_Linux_distribu...

Re:Fedora 40 Plans To Unify /usr/bin and /usr/sbin by mongol on Sunday December 24, 2023 @05:25PM (#38757582)
In NixOS, programs are installed in many different unique paths that are added to PATH through symlinks. There are very few programs added to static directories such as /usr/bin. This in itself may not sound like an improvement, but NixOS as a whole has a very different idea how to manage dependencies. Difficult to explain well, but it feels like fresh air compared to the slow evolution of historical Unix principles that most other Linux distributions follow.
Re:Fedora 40 Plans To Unify /usr/bin and /usr/sbin by PrimeMcFly on Sunday December 24, 2023 @05:36PM (#38757688)
So you can't easily see which programs are installed in a directory, it's all abstracted away in a database?

That sounds horrible. NixOS sounded kind of interesting, but if that's true it kills any interest I had in it.

Re:Fedora 40 Plans To Unify /usr/bin and /usr/sbin by mongol on Sunday December 24, 2023 @05:44PM (#38757760)
It is called the Nix store, it is not a database as much as a special type of file hierarchy. It is not horrible, but it breaks tradition for sure. The benefits are best understood when evaluating NixOS as a whole, of which the file hierarchy is just a part.
Re:Fedora 40 Plans To Unify /usr/bin and /usr/sbin by PrimeMcFly on Sunday December 24, 2023 @06:17PM (#38757996)
Thanks for clarifying.
Re:Fedora 40 Plans To Unify /usr/bin and /usr/sbin by db48x on Sunday December 24, 2023 @08:50PM (#38758848)
One of the main benefits is that you can have multiple versions of something installed in the store, with individual environments pulling in the specific version that they require. Makes it really easy (or at least possible) to keep old software running, or to keep multiple environments running on the same computer even though the people who use them don't cooperate.
Re:Fedora 40 Plans To Unify /usr/bin and /usr/sbin by PrimeMcFly on Sunday December 24, 2023 @08:57PM (#38758909)
Is it intuitive to navigate the file hierarchy? I don't mind something new but I don't want my files abstracted in any way.
Re:Fedora 40 Plans To Unify /usr/bin and /usr/sbin by db48x on Sunday December 24, 2023 @10:02PM (#38759270)
The paths to things in the nix store have hashes in them, so they are not intuitive at all (and they’re not intended to be). Inside an environment, a program like Perl could still be located at /use/bin/perl, but it will be a symbolic link to the nix store. Alternatively, your environment might have a PATH variable that mentions all the necessary nix store paths. It depends on how you built that environment, which will depend on what the programs you run in that environment require.

On the other hand, your personal files I your home directory are left alone; they don't get put in the nix store. An environment that needs access to your personal files (such as your desktop) simply has your home directory mounted into it.

Re:Fedora 40 Plans To Unify /usr/bin and /usr/sbin by PrimeMcFly on Sunday December 24, 2023 @10:19PM (#38759364)
I don't think Nix is for me then. Thank you for the explanation though, I appreciate it.
Re:Fedora 40 Plans To Unify /usr/bin and /usr/sbin by deciduously on Monday December 25, 2023 @07:20AM (#38762016)
> I don't want my files abstracted in any way.

That's what a file system is.

Re:Fedora 40 Plans To Unify /usr/bin and /usr/sbin by PrimeMcFly on Monday December 25, 2023 @11:14AM (#38763734)
I'm sure you know exactly what I meant, so do you really think your comment here is helpful or productive in any way?