4 ms·
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?)
by RamRodification 3y ago
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?)
- mongol 3y agoIn 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.
- PrimeMcFly 3y agoSo 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.
- mongol 3y agoIt 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.
- PrimeMcFly 3y agoThanks for clarifying.
- db48x 3y agoOne 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.
- PrimeMcFly 3y agoIs it intuitive to navigate the file hierarchy? I don't mind something new but I don't want my files abstracted in any way.
- db48x 3y agoThe 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.
- PrimeMcFly 3y agoI don't think Nix is for me then. Thank you for the explanation though, I appreciate it.
- deciduously 3y ago> I don't want my files abstracted in any way. That's what a file system is.
- PrimeMcFly 3y agoI'm sure you know exactly what I meant, so do you really think your comment here is helpful or productive in any way?
- jiehong 3y ago> 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_distribution https://nixos.wiki/wiki/Overview_of_the_NixOS_Linux_distribu...