diff options
author | Martin Fischer <martin@push-f.com> | 2024-11-29 08:01:14 +0100 |
---|---|---|
committer | Martin Fischer <martin@push-f.com> | 2024-12-11 08:32:27 +0100 |
commit | dfb73342a094871a54185d90841430be087e109c (patch) | |
tree | c554387e9b3bb870efede3c01835f00f9c4af3d7 /nixos/README.md | |
parent | 112c101c7308ddd710d0936ad8d1c010ae0dfb28 (diff) |
refactor: switch to npins
niv is written in Haskell, while npins is written in Rust. I'm more
comfortable with Rust. npins also seems more actively maintained.
The files in npins/ were generated with:
nix-shell -p npins
npins init --bare
npins add --name nixos channel nixos-24.05
Diffstat (limited to 'nixos/README.md')
-rw-r--r-- | nixos/README.md | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/nixos/README.md b/nixos/README.md index e96348b..6c4bcb1 100644 --- a/nixos/README.md +++ b/nixos/README.md @@ -4,11 +4,11 @@ This is a fairly straightforward setup for making a NixOS system configuration s This means: - `nix-channel` is disabled -- Nixpkgs is managed with [niv](https://github.com/nmattia/niv) [^1] +- Nixpkgs is managed with [npins](https://github.com/andir/npins) [^1] - The same Nixpkgs is used for the system and all Nix commands - This includes the Nixpkgs version, config and overlays -[^1]: Yes niv is a third-party tool, but it's essentially just a nice wrapper around `nix-prefetch-url` and co. +[^1]: Yes npins is a third-party tool, but it's essentially just a nice wrapper around `nix-prefetch-url` and co. ## Usage @@ -31,10 +31,10 @@ We're assuming that you just installed NixOS by going through the [official inst ``` nixos-generate-config --dir . ``` -3. Pin Nixpkgs to the [latest stable version](https://nixos.org/manual/nixos/stable/release-notes) using [niv](https://github.com/nmattia/niv): +3. Pin Nixpkgs to the [latest stable version](https://nixos.org/manual/nixos/stable/release-notes) using npins: ``` - nix-shell -p niv --run \ - 'niv init --nixpkgs NixOS/nixpkgs --nixpkgs-branch nixos-23.11' + nix-shell -p npins --run \ + 'npins init --bare && npins add --name nixos channel nixos-23.11' ``` 4. Remove all stateful channels: ``` @@ -52,11 +52,11 @@ Here are some changes you can make: - Change the NixOS configuration in `./configuration.nix` - Update the pinned Nixpkgs: ``` - niv update nixpkgs + npins update nixos ``` - Upgrade to a newer release: ``` - niv update nixpkgs --branch nixos-23.11 + npins add --name nixos --channel nixos-23.11 ``` - Change the Nixpkgs config by editing `nixpkgs/config.nix` - Add Nixpkgs overlays to `nixpkgs/overlays.nix` |