5 ms·
I'm not sure I fully understand what Guix is. Is it a replacement for pacman / apt-get etc..?
by weavie 11y ago
I'm not sure I fully understand what Guix is. Is it a replacement for pacman / apt-get etc..?
- rekado 11y agoFrom the announcement: > GNU Guix is a functional package manager for the GNU system. The Guix System Distribution or GuixSD is an advanced distribution of the GNU system that relies on GNU Guix and respects the user's freedom. > In addition to standard package management features, Guix supports transactional upgrades and roll-backs, unprivileged package management, per-user profiles, and garbage collection. Guix uses low-level mechanisms from the Nix package manager, except that packages are defined as native Guile modules, using extensions to the Scheme language. GuixSD offers a declarative approach to operating system configuration management, and is highly customizable and hackable. You might also find this little poster helpful: http://elephly.net/downies/poster-v3.pdf http://elephly.net/downies/poster-v3.pdf
- agumonkey 11y agoA different approach at package management. Inspire by functional programming. Installing a package defines a new system generation shadowing the previous one. The older generation aren't removed. You can thus have multiple version of a package on disk and jump back and forth between generations.
- michaelsbradley 11y agoIs there a recommended approach for using Guix along with VMs or containers (in the most general sense)? My day-to-day machine is a mac laptop; but for my software development work, I have been using docker-machine, docker-compose and docker server/client to configure, spin up, wire together, and tear down repeatable Linux environments, which run inside VirtualBox on my mac. I'm interested in what a comparable (in a broad sense) workflow might look like with Guix, but I'm not quite sure where/how to start.
- rekado 11y ago"guix environment" can spawn a container to run software in isolation. There's also "guix system vm" to build a virtual machine, or "guix system container". Note, though, that Guix has not been ported to MacOS yet.
- panglott 11y agoNixOS has soemthing similar https://nixos.org/wiki/NixOS:Containers https://nixos.org/wiki/NixOS:Containers
- michaelsbradley 11y agoI don't want a full port, at least I'm pretty sure I don't; consider, with my current setup I'm always running the Docker daemon on a Linux host. In a bash shell running on MacOS, I'm using the client-side command-line Docker tools (the three I mentioned previously), which have been ported; and the Mac edition of VirtualBox is obviously running on MacOS as well. Is there any possibility of using the guix command-line tools, ported to MacOS, which would then talk to a remote Linux host (could be in the cloud, could be a VirtualBox VM running locally on my mac laptop, etc.)? Does guix envision a client/server "mode" of usage?
- rekado 11y agoYou can use the guix command line tool and let it talk to a remote guix-daemon. I would not know how to set this up on a Mac, but Guix is in fact designed such that the command line tool is separate from the daemon. I'm using this feature to provide users of our scientific compute clusters with a way to manage their software on all cluster nodes. The Guix tool on the nodes connects to one central guix-daemon. That's all GNU/Linux, though. I don't know if this could work on a Mac. You could ask on guix-devel@gnu.org or on #guix at freenode.
- agumonkey 11y agops: also stronger transactional semantics. You can only switch to a new generation if all went right, and the old generation is still as correct. Few times under other distro an update changed some dynamic library that then caused a crash when some already in-memory program decided he wanted to link to it.
- mbrock 11y agoHere's an evocative screenshot: http://www.gnu.org/software/guix/screenshots/0.8.3/guix-system-vm.png http://www.gnu.org/software/guix/screenshots/0.8.3/guix-syst... It's a distribution of Linux that uses the Scheme language both for defining packages and for configuring the user's system. In that picture, someone is generating a QEMU image from a certain system configuration. The Guix tools will read the configuration file, and then create a VM that matches its parameters. You might be reminded of Ansible, Vagrant, and similar tools for "declarative" configuration. Note how the configuration specifies a list of user accounts. Later, inside the VM, you could modify that list -- say, change Bob's name, add Alice, and also create a common user group for them -- and then tell Guix to update the system. It would then look at its current configuration and figure out what to change. The same applies for things like defining system services. So you will have a Scheme file that defines, say, that nginx should be running on port 80 with these three different vhost configurations. The distribution will then know how to generate an nginx configuration file, how to setup the init system, and how to reload these things on changes. (I don't know if Guix has a predefined thing for generating Nginx configurations; if not, you can certainly build one easily with some Scheme expressions.) I use NixOS, which is an earlier implementation of the same idea. Me and my brother, with whom I work, share a basic system configuration file. That means I can define a new web service, along with whatever package dependencies it may have, even including creating a new user account -- and push that to our repository, so he will pick it up, and then I can say "hey, check out localhost:8050" and it'll just work. We also use NixOS on our cloud servers. We have one configuration file that declares all of our services (redis, etc) along with our app vhosts (mostly in the form of systemd units that launch Docker containers, using some custom Nix functions). This means that our services are always running the same way on our laptops as on the server, just on different domains (the server's internet domain vs our localhost domains).