5 ms·
Environment containers in GNU Guix
- ossreality 11y ago"The container tools I'm working on are completely declarative." Tears of joy stream down my face.
- trishume 11y agoNixOS (the inspiration for Guix) has supported something like this for a while: http://nixos.org/nixos/manual/index.html#ch-containers http://nixos.org/nixos/manual/index.html#ch-containers There's even support coming in Nix for building standard layered Docker containers in a fully deterministic way: https://github.com/NixOS/nixpkgs/pull/11156 https://github.com/NixOS/nixpkgs/pull/11156 The deterministic properties of Guix and NixOS allow some amazing things. I personally prefer Nix as it has a more complete and mature ecosystem, but everyone should check out both projects though.
- pmoriarty 11y agoThe main advantage of Guix over Nix seems to be that the former uses Scheme, while the latter uses a language of its own. As a lover of Scheme, that's a big win for me. I really don't want to have to learn a special-purpose language just for package management.
- trishume 11y agoI'm definitely a lisp fan, but the Nix language isn't as bad as I used to think. The laziness allows for some really cool and clean patterns that work intuitively and simply while still enabling powerful features. Also the syntax is tuned for clean hierarchical config files. And in some cases being pure helps you not shoot yourself in the foot with determinism. I still would probably prefer Guile, but Nix is nice enough. Mainly I just like the much larger ecosystem Nix/NixOS has. I can forsee myself being productive with NixOS as a desktop OS, not so much for GuixSD. I think of it this way: one new somewhat-fancy config language to learn is much better than the 100 simple config languages you learn to tweak Arch Linux.
- civodul 11y agoNote that Guix also supports lightweight development environments in containers, via user name spaces: http://www.gnu.org/software/guix/manual/html_node/Invoking-guix-environment.html http://www.gnu.org/software/guix/manual/html_node/Invoking-g... . This is in addition to whole-system containers: http://www.gnu.org/software/guix/manual/html_node/Invoking-guix-system.html http://www.gnu.org/software/guix/manual/html_node/Invoking-g... .
- pmoriarty 11y ago"The container tools I'm working on are completely declarative. No imperative Dockerfiles! This means that you don't have to worry about order of operations, something that you have to think about constantly when using Docker, especially when trying to maximize the use of the image cache." Sometimes you actually need or want something to be done before something else, though. I'm wondering how Guix deals with that, or if it's capable of dealing with that. I've been bitten many times by Puppet's default lack of order in its declarative manifests. What was vaunted to be an advantage turned out to be a curse when you actually do want/need them to be in order. I hope Guix does a better job at this than Puppet.
- trishume 11y agoBasically it solves the problem a different way than you think. Instead of allowing you to control order, it removes the possibility of order mattering at the system level. Nix and Guix use special file structures to make sure everything is isolated so no build can affect another, unless there is a depedency, in which case one will be built before the other. It is this powerful isolated file structure that allows NixOS and GuixSD to deliver on the promise of deterministic system set up in a way Puppet and Chef will never be able to. It works incredibly well.