Seems like this distro is getting a lot of traction recently. Has anyone tried it? Is it any good?
Being using it for almost 2 years. Was very weird at the beginning because of the “declarative” approach they used. But once you get used to it… Its a life changer.
Declarative? Could you explain?
Your whole system is defined in a file called
configuration.nix
. This file describes everything about your system: all packages installed, which Desktop Environment / Window Manager to use, and also configuration for almost everything (e.g. zsh or neovim). When “switching” (which is basically installing/updating the system), Nix looks at the configuration and changes your system according to what you’ve declared in theconfiguration.nix
, installing or uninstalling packages for instance.So, the state of your system is “declared” in a single file, which can be tracked in git or backed up wherever. If you have mulitple systems, you can also share parts of your config between them, which makes configuring and customizing stuff a lot easier.
There are a lot of other aspects, but thats the basic gist of it
Is it a big learning curve? Is this the emacs equivalent of OS configuration/installation?
edit: another question - Could I play around with it by installing in qemu and if I like that, take my configuration.nix from qemu and install it as my main OS?
Could I play around with it by installing in qemu and if I like that, take my configuration.nix from qemu and install it as my main OS?
Absolutely. That’s how I got started ;)
If you install Nix (the package manager) on your current system, you can actually directly build a vm from a config file via
nixos-rebuild build-vm
.