4 ms·
Here'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-s
by mbrock 11y ago
Here'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).