My personal flake-based NixOS configuration, as well as some docs and illustrative examples.
- nixos_flake/: my current nixos configuration and dotfiles flake.
- examples/: contains some helpful examples to help illustrate the nix the different components being used here.
- docs/: contains some personal docs for using this repo.
Ensure that this repo is cloned into $HOME
.
Open .envrc and ensure the proper options are set. $nixos_profile
must be set to one of the available profiles for task
to run.
Use the taskfile targets to get started. Note that on first run, task
will not be installed so use nix-shell -p go-task
to temporarily install it.
task install
Afterwards, use task rebuild
to reload configuration.
- Stability: NixOS never breaks in day-to-day operation, and when it does break while applying system changes, by design you always have an easily-recoverable backup.
- Reproducibility: NixOS supports specifying your entire system in fully declarative and reproducible flakes. It's a lockfile for your entire system.
- Features: NixOS is extremely feature-rich, and has the largest package index for both stable and fresh packages, nixpkgs.
- Documentation: Docs vary greatly in quality, freshness, and availability; it's also hard to know where to look for documentation for a specific topic.
- Error messages: By default, NixOS has awful error messages. This problem can be remedied using tools like nh (nix-helper).
- The elephant in the room, Nix language: The Nix DSL is very well suited to its intended purpose of creating NixOS derivations. However, the fact that Nix lang is a declarative, functional, domain-specific language with a difficult learning curve is a big turn-off for some people. This is not helped by the fact that there are many different patterns to accomplish the same end goal, with vastly different tradeoffs that are not immediately clear, and with little standardization by the community, and the situation becomes confusing.
- e.g. user package management:
environment.systemPackages
inconfiguration.nix
vs.home-manager
vsconfiguration.nix
ANDhome-manager
vsnix-env
vs ...