5 ms·
What do you think about Nix
by quaintdev 4y ago
What do you think about Nix
- superkuh 4y agoNix is the ultimate expression of this abandonment of the concept of a desktop distro. It doesn't even try to have system libraries. Nix gives up re: future shock. The entire OS is just containers. I'm sure it works fine if you only ever use popular software but as someone that's constantly compiling and adding little .c programs from the 'net to my bin/ having to manually create and specify the entire "system" libraries set bit by bit every time I want to compile (or run!) something is no go. Great for business use as server, bad for human persons as a desktop.
- RGamma 4y agoHaven't tried it but you could probably pin an env with everything you would want and then use direnv for automation. And for quick experiments there's FHS/steam-run. But yeah.. setup.
- gray_-_wolf 4y ago> manually create and specify the entire "system" libraries set bit by bit every time I want to compile (or run!) something is no go. I don't have first hand experience with nix, but if I would look at this statement from Guix point of view (and I assume nix will be same/very similar), this is not really true. Nothing prevents you from having a list of libraries (in a manifest). That list might be way to wide for any specific program and it can represent what you would normally have as "system libraries". You can then just invoke shell as guix shell --manifest=manifest.scm and you will be given working shell with all the libraries available. You can also just package your program using trivial copy&paste code with the same list. Sure, the dependencies will be too wide, but since you are not sending the package to upstream Guix for inclusion, no one really cares. So, is it as friction-less as "normal" distro? No (especially the "add to /bin" part). Is it as bad as "manually create and specify the entire "system" libraries set bit by bit every time"? Also no.
- rgoulter 4y ago> Nix is the ultimate expression of this abandonment of the concept of a desktop distro. NixOS deliberately avoids having global/implicit 'system' libraries / configured state, and instead demands declarative expression of the system configuration. -- The libraries the system uses don't adhere to a global FHS structure. Nix similarly eschews use of global/implicit libraries. Building each package requires its dependencies be declared. However, it's incorrect to say this is "just containers". I don't see how you get "abandonment of concept of desktop distro" from "doesn't have implicit system libraries". -- NixOS allowing the whole system configuration starting from a single file is convenient, and something people might otherwise use a tool like Ansible for. That said, NixOS obviously has many use cases which have significantly higher friction compared to more typical systems. (And a steep learning curve to overcome that friction). -- e.g. on Arch or Ubuntu, the system configuration is global and malleable.
- lifty 4y agoYou are confusing it. Nix does not use containers.
- superkuh 4y agoRight. Nix is containers.
- kaba0 4y agoMaybe don’t double down on something you don’t understand and has been corrected about several times.
- superkuh 4y agoMaybe don't pretend a trivial semantic difference due to your point of view means I don't know what I'm talking about. Yes, Nix only alters environmental variables, but guess what, that's pretty much what Snaps do too plus a bit of bind use. The fact that people are constantly asking "Will Nix Overtake Docker" is another hint about actual usage. Snaps bind in the libs, Nix sets env variables to set the available libs. The goal and end results are the same. The difference is more marketing than anything else.
- colordrops 4y agoWhat does a container mean to you? On Nix there is no separation of file system or network across applications. The same installed libraries can be used by multiple apps. Apps have access to the same system services and run together, e.g. with a single systemd. How can you call what Nix is doing "containers" ? There's virtually no overlap. Zoom overtook the local freeway as the preferred mechanism for get to meetings at my company. I guess Zoom is a road by your logic.
- superkuh 4y agoOn Snaps there is no separation of network access. The same installed libraries can be used by multiple applications. Applications have access to the same system services and run together. How can you pretend Nix is different from a Snap container? There's virtually complete overlap. Or maybe you'll now say that Snaps are not containers because they do it in a Nix like way? By your logic a frontage road is not a road just because it's dedicated to a single commercial development and named differently. In my top level post which started this big thread I claimed that the purpose of containers (Nix, Snaps, Flatpack, Docker, AppImage, etc) is to solve the future shock problem and allow running of broken applications by controlling the libs available. I stick to that claim here.
- mplanchard 4y agoAs others have pointed out, this is wrong. You generally by default use shared versions of whatever your system libraries are, which are packaged as part of a given nix release. Software can specify other, particular versions if needed. If you need access to the shared libs or some special libs in a dev environment you can specify that in the dev environment definition, and they are then available as usual. We use this, for example, so rust libraries can compile against the standard SSL library that comes with nixpkgs.
- kaba0 4y agoYou really misunderstand Nix then. Nix is the actual and only novel solution in this space — you can just have a single flake file in your repository to make it always reproducible. It will only build/download files that are necessary, using a minimum required space. But for this reason it can also just point you to a binary cache and you can copy the necessary data (basically just a diff of what is required dependency for running program P and your system). Just because the source is not available doesn’t mean that the dependencies can’t be explicitly specified and use some standard deps. Chances are that proprietary app will just depend on a libc you already have downloaded.
- colordrops 4y agoIt would be a better solution if it had a proper GUI that auto-generated config for novice users. Until then it's too hard to use for non-technical folk.