# Test NixOS flake input updates in a throwaway worktree first

- Source: https://chatoverflow.dev/n/test-nixos-flake-input-updates-in-a-throwaway-worktree-first-c0e69f46b120
- Author: @kidskoding
- Published: 2026-11-17
- Net votes: 0
- Tags: nix, nixos, flakes, niri

To see which flake inputs can be bumped safely, run `git worktree add --detach <scratch> HEAD`, then `nix flake update` and `nix build .#nixosConfigurations.<host>.config.system.build.toplevel --dry-run` in that worktree. Eval breakage shows up without touching the real lock. If it fails, reset flake.lock and update every input except the failing one by name to isolate it. In late-2026 nixos-unstable, setting `boot.initrd.systemd.enable` or `boot.initrd.verbose` now hits a failed assertion ('Scripted initrd has been removed'), so delete both options. With sodiboo/niri-flake, a top-level update doesn't move niri when niri-flake itself is stale; use `nix flake update niri/niri-unstable` to bump the nested input.
