5 ms·
>The big cost about Nix/Guix that puts people off is that it eliminates a human-readable filesystem. The traditional layout is gone or empty, replaced by a tonn
by dannymi 3y ago
>The big cost about Nix/Guix that puts people off is that it eliminates a human-readable filesystem. The traditional layout is gone or empty, replaced by a tonne of folders under `/nix/` called stuff like `240-572-9837wfgjh234098672-_bash` and you have to just... trust that your path and so on will work and stuff will just get found somehow.
Not really trust. Nix and Guix are not magic.
You can still use ldd to figure out what (now exact!) library anything is gonna use. Guix and Nix use the rpath feature.
And your profile directory in Guix is a normal directory called $HOME/.guix-profile . Currently, it has "bin" and "share" and "sbin" and "libexec" and "lib" and so on in there. That is what the end user uses. Entries in those do link to /gnu/store/xyz/bin/xyz (using regular symlinks), yes.
>Instead of a flat directory tree with hashes, a consistent algorithm that categorises apps and puts them in a tree:
One hash represents all the dependencies of that package, too.
One directory name in Guix's /gnu/store encodes both the direct sources and all the dependencies, all the way up to a bootstrap root (the latter of about 250 Bytes of binary). If any of the dependencies of bash changes, the hash will change, too. That also means that you will have multiple /gnu/store/*-bash-5.1.16 in there in a normal system.
But in your proposed case, you'd have to introduce some magical things which figure out and STORE the dependencies somehow differently in the background. Guix doesn't do that. It stores that in the file system, the end (as in directly in the file system, not as in "the system database blob is in file /foo"). No magical extra store.
That said, it would be possible to only change the guix profile layout to be what you suggest, and then still have symlinks to /gnu/store/<hash>-xyz in there. Probably like 5 h of work, and end user programs most likely will work on the first try. Patches welcome.
See guix/profiles.scm for what creates the profile. %user-profile-directory is $HOME/.guix-profile . profile-derivation is the function you want to change.
You can also use guix on top of whatever other Linux distribution and try it out like that. The package manager (which makes the profiles) also supports containers--so you can safely try out whether your change works.
- lproven 3y ago> Not really trust. Nix and Guix are not magic. Did I say they were? I didn't mean to. I've researched Nix. I've written about it. Nix people contacted me to thank me for doing so. https://www.theregister.com/2022/12/13/nixos_2211_raccoon/ https://www.theregister.com/2022/12/13/nixos_2211_raccoon/ https://www.theregister.com/2021/12/03/nixos_linux_os_design/ https://www.theregister.com/2021/12/03/nixos_linux_os_design... The reader comments I get is that a non-human-readable filesytem (or only marginally so, by ignoring the hashes and looking in the new single-level hierarchy for recognisable fragments of names) is just too high. They don't have enough of a problem with how things are to choose a whole new method with this very high price. (Which is the same reason Plan 9 flopped, as I have both written about and spoken publicly at FOSDEM about this month.) https://fosdem.org/2024/schedule/event/fosdem-2024-3095-one-way-forward-finding-a-path-to-what-comes-after-unix/ https://fosdem.org/2024/schedule/event/fosdem-2024-3095-one-... https://www.theregister.com/2024/02/21/successor_to_unix_plan_9/ https://www.theregister.com/2024/02/21/successor_to_unix_pla... > You can still use ldd I submit that this is rocket science to the majority of Linux users and is not a sufficient answer. > And your profile directory in Guix is a normal directory I confess I've not looked at Guix yet. But saying that, I don't think having a normal homedir isolated in a partition full of alien weirdness is enough, TBH. > One hash represents all the dependencies of that package, too. I am not sure that I understand what this means, but is there any reason this could not be combined with my proposal? > That said, it would be possible to only change the guix profile layout to be what you suggest Interesting. Suboptimal but interesting. Would make it a little less intimidating, I suspect. > You can also use guix on top of whatever other Linux distribution Again, as I said, for most of us, it's a very cognitively expensive extra step to solve a problem we simply don't have.
- dgfitz 3y ago> I submit that this is rocket science to the majority of Linux users and is not a sufficient answer. That can't be true, can it? I guess it depends on the definition of "users."
- lproven 3y agoIt absolutely 100% can be true. As an example: Windows Services for Linux 2 used a special init daemon to interact with the host OS. That meant no systemd. That meant that the `systemctl` program wasn't there. This baffled legions, armies, of wannabe sysadmins. https://stackoverflow.com/questions/55579342/why-systemd-is-disabled-in-wsl https://stackoverflow.com/questions/55579342/why-systemd-is-... https://superuser.com/questions/1785697/systemd-in-wsl-on-windows-11-is-not-working https://superuser.com/questions/1785697/systemd-in-wsl-on-wi... https://github.com/microsoft/WSL/issues/9477 https://github.com/microsoft/WSL/issues/9477 https://askubuntu.com/questions/1132230/unable-to-run-any-systemd-services-in-wsl https://askubuntu.com/questions/1132230/unable-to-run-any-sy... People on the whole have no idea how this stuff works, and they just copy magic incantations from StackOverflow to get stuff to happen. If that doesn't work, then this OS is broken. The end. For these guys, WSL was broken. Result: MS hired Lennart Poettering. https://www.theregister.com/2022/07/07/lennart_poettering_red_hat_microsoft/ https://www.theregister.com/2022/07/07/lennart_poettering_re... He "fixed" it. Systemd now works in WSL2. All those guides for noobs now work. Everyone is happy. In a world where tools like Flatpak and Snap are proliferating and it's driving deep divisions between Linux distros, if you think the average person struggling with Linux is going to use `ldd` to work out where the dependencies for something live, I'm afraid you are a deep guru who lives on a different plane of existence. We now have widely-used packaging systems which simply embed an apps entire dependency tree into a package to avoid people having to work out the difference between `apt` and `rpm`. Thousands of terabytes of disk are being burned to make this stuff go away. Yes, this is too hard. Way too hard.
- dgfitz 3y agoYou make a compelling argument. > I'm afraid you are a deep guru who lives on a different plane of existence. I'll take that as an amusing tip of the cap, I hope that is how it was intended. I don't know if I consider myself a deep guru, but if something doesn't run when I expect it to, I do tend to reach for ldd pretty quickly.