This is my attempt to live with NixOS as a daily driver. Be cautious that I'm still trying to figure Nix out and fit in. There might be serious idiomatic & structural flaws.
| Machine | System | Status |
|---|---|---|
| Desktop | NixOS | Done |
| Laptop | MacOS | WIP |
- Make repo usable by multiple machines (see Wimpy's repo)
- Adopt encryption or a way to store secrets separately (see agenix)
- Document the way(s) this repo is used
Using Flake means that nixpkgs are no longer controlled by nix-channel of NixOS.
Instead, nixpkgs are locked to flake input.
To update the system one needs to update the input:
nix flake update --commit-lock-fileNext step is checking, what exactly was updated:
doas nixos-rebuild build --flake '/etc/nixos#' && nvd diff /run/current-system resuThe final step is to use new system/ switch to it:
doas nixos-rebuild switch --flake '/etc/nixos#'Before deciding if a given package is going to stick with my system I prefer to use it without adding it to my config.
So I add in to the nix-env.
These packages are not updated with the rest of the system through flake lock mechanism.
Instead, they are using nix channel configured for the root user (nixos-unstable).
First one needs to update a channel, info about available package:
sudo nix-channel --updateThen update packages themselves:
nix-env -u '*'