GUIX and FreeBSD(AnyBSD) ? reddit / BSD ---------------------------------------------------------------------- Gualdrapo · 2019-07-17 13:57 > Guix is a package manager inspired by Nix and Guix System is the operating system equivalent of NixOS. [...] __It departs significantly from Unix-style operating systems__. -- [Source](https://ambrevar.xyz/guix-advance/) Seems to me like Guix is intended to work very tightly with other Hurd stuff. I agree with you on your original post that the current ports system has its drawbacks - at least for me, the fact it can't manage system software as 'packages' and you need another tool for them is ridiculous and, being so used to Gentoo's Portage, ports seem to be years behind - but the current state of divergence between the BSDs seems like an opportunity to make the ports system better, and why not, inspired on what Guix is doing (beyond pkgbase). ---------------------------------------------------------------------- flatland_spider · 2019-07-17 14:50 I like how a system can configured via single file. That would be nice to have. The big thing Guix and Nix bring to the table is atomic updates. FreeBSD already has this ability with ZFS snapshots and ZFS boot environments. For instance, Project Trident ([https://project- trident.org/](https://project-trident.org/)) creates boot environments for upgrades, and if the new upgrade breaks something, you can rollback. I'm intrigued by Nix and Guix, and you could probably do something similar with the tools built into FreeBSD. With other BSDs, like OpenBSD, you might want to look at Lmod ([https://github.com/TACC/Lmod](https://github.com/TACC/Lmod)) as a starting point. It's MIT licensed and based on Lua. ---------------------------------------------------------------------- flatland_spider · 2019-07-17 15:25 >the fact it can't manage system software as 'packages' and you need another tool for them is ridiculous Not at all. There is FreeBSD, and then there is Ports. They are two separate projects. It's more like AUR's relation to Arch. It's officially sanctioned, but it's on the community to maintain. I'd like the base OS to be more modular since I'd like to easily strip out parts which aren't needed, like compilers, but the base updater doesn't need to be able to work with ports. In contrast, Gentoo is really just a framework for building an OS. This is in the Linux tradition where distros are just a collection of tools and software, and at one point there was the option to choose between the FreeBSD kernel and the Linux kernel. FreeBSD in contrast is a tightly coupled base system with a framework for building third-party software built by the community. ​ >inspired on what Guix is doing Ports already sidesteps the pathing issues Guix and Nix address by installing different versions into different directory trees, and atomic updates can already happen when using ZFS. ---------------------------------------------------------------------- meabandit · 2019-07-17 15:43 > the fact it can't manage system software as 'packages' and you need another tool for them is ridiculous and, being so used to Gentoo's Portage, ports seem to be years behind Aside from the enormous and obvious benefits to having a segregated OS and 3rd party tooling, ports is also responsible for identifying 3rd party brain-dead packaging issues that other OS's packaging systems fail to identify. Not finding these items is a huge problem with stability and security implications. A recent example of such a find told from both perspectives: * https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=226400#c42 * https://github.com/googleapis/google-cloud-cpp/issues/2875 ---------------------------------------------------------------------- Gualdrapo · 2019-07-17 15:51 You're absolutely tergiversing on its entirety what I said. > Not at all. There is FreeBSD, and then there is Ports. I never even suggested Ports is a core thing from FreeBSD - just the _fact_ you need a tool to manage additional software, and other tool to manage core software. For a user it's completely ridiculous, no matter the conception of the OS. > In contrast, Gentoo is really just a framework for building an OS. Again, you're dead wrong on what I said. I was never talking about the spirit of Gentoo but the functionality and power of Portage of finetuning a system - an aspect on which ports is years behind. > Ports already sidesteps the pathing issues Guix and Nix address by installing different versions into different directory trees, and atomic updates can already happen when using ZFS. That doesn't make for the security issues mentioned by OP and for _all_ what Guix offers. ---------------------------------------------------------------------- [deleted] · 2019-07-18 02:10 [deleted] ---------------------------------------------------------------------- flatland_spider · 2019-07-18 17:03 >ZFS rollbacks mean that if you do A -> B -> C -> D, and then decide that you don't like D, you can go back to C. But what do you do if you like C and D but want to remove B? You have to go back to A and reinstall C and D. That's a fair point. I thought about that. ZFS does make more sense in the picture of enterprise style changes, and it's more of a lightweight system backup. I'm not sure if it's an option to snapshot stuff in the micro. Different workflows. >And while FreeBSD separates base from ports, it doesn't separate ports from each other This is true. :) GUIX and NIX do have the advantage of, basically, software trees. Depending on the environment, desktop vs servers, this could or could not be a problem. For servers, there are jails to logically separate services. For desktops, I will concede there isn't a create way to do that. >So if you want to remove them, you have to go through all those directories and see what needs to be removed I don't remember coming across this problem. I've always been happy with how things get cleaned up, which isn't the case with some other package management tools (yum), and any problems were because I did something dumb. Of course, I heavily subscribe to school of thought that servers should be disposable, so things get deleted after they get replaced. Ports uses the pkg SQLite database to keep track of what is installed. I'll have to look closer and see. >Nixos, on the other hand, keeps all configuration in one file The config management aspect of Guix and Nix is the thing that really intrigues me. I've gotten really annoyed with most mainstream config management tools, and I've been looking around for something better. The other features are nice, but they can be worked around. ---------------------------------------------------------------------- someoneelsesfriend · 2019-07-21 11:37 FreeBSD can be installed automatically by unpacking the installation media file, putting a few enviroment variables and a /bin/sh script in /etc/installerconfig, and then repacking the file. There's an example on [this page](https://www.sysadminnotes.ca/worknotes/automated-freebsd- installations.html) and it's described in [the SCRIPTING section of the bsdinstall(8) man-page describes](https://www.freebsd.org/cgi/man.cgi?bsdinstall#SCRIPTING). This feature was [added back in 2013](https://svnweb.freebsd.org/changeset/base/245706), so it's not exactly new. (Edited the post a bit for clarification and a note about the history)