I've been thinking about trying NixOS for a while. I think the concepts are elegant, and I have been finding Nix flakes to be very nice for software development. I'm about to get a new machine so I'm ready to take the plunge. Any advice before I dive in?
I'd like to set up Gnome with some extensions. One of the things I especially want to learn is how to set up graphics drivers, Vulkan, and Lutris.
For anyone who hasn't heard of it, Nix is a "declarative" package manager. Each package is stored with a hash that encodes its exact source, build script, dependencies, etc. You can have packages installed with mutually-incompatible library dependencies, and Nix makes it just work. For purposes of setting up per-project dependencies Nix does what Docker does, but faster, with more cache hits, and without emulation / containerization. If you want to deploy Docker images, Nix can build images that are more efficient than what you get from dockerfiles.
You can use Nix as an additional package layer in Linux, MacOS, or Windows with WSL. Think of it as an alternative to Homebrew.
NixOS is a Linux distro that uses Nix as its primary package manager, and uses Nix principles to manage configuration. Instead of running commands to install things, and then later forgetting what you installed or why, packages are listed in config files. The system installs and links packages as necessary. Anything you remove from your config is unlinked. When you want to reclaim space you can garbage-collect unused packages.
I think you can mount an ISO image under your running system and make changes. I found a couple of guides that might be helpful:
How to Mount an ISO File on Linux
Edit and repack .iso bootable image
I haven't done this before, but I think you can
chroot
into the mount directory, and run package manager commands in the mounted image to install another package.Or I have an alternative suggestion that might or might not be easier. I've been hearing a lot about immutable/atomic distros, and people designing their own images. You could make your own ublue image, for example, with whatever you want on it.
A promising looking starting point is github:ublue-os/startingpoint. Ignore the "Installation" instructions, and follow the "ISO" instructions instead.
Or I saw recently an announcement of a new way to build atomic images that is supposed to be easier than ever, BlueBuild