I have noticed that almost since forever, when I’m rebuilding my system, the system evaluates my configuration twice. I don’t know why. I press rebuild, it evaluates and once it is done, it is immediately retrying. You can see it in the console log by the double warning: Git tree '/home/bs/dotfiles' is dirty warning. Am I doing something wrong?
My flake is defined here: https://codeberg.org/BlastboomStrice/dotfiles/src/commit/3ae81f9a7e44bfba25d263c96b22f0edc5e945fc/.config/nixos-config/flake.nix
In the example below I added the package cowsay in my configuration.nix and rebuilt:
$ sudo nixos-rebuild switch --flake ~/dotfiles/.config/nixos-config/#$(hostname) && nix store diff-closures /run/*-system
warning: Git tree '/home/bs/dotfiles' is dirty
building the system configuration...
warning: Git tree '/home/bs/dotfiles' is dirty
stage> Running phase: patchPhase
...
Checking switch inhibitors... done
Skipping "/boot/EFI/systemd/systemd-bootx64.efi", same boot loader version in place already.
Skipping "/boot/EFI/BOOT/BOOTX64.EFI", same boot loader version in place already.
stopping the following units: accounts-daemon.service, polkit.service
activating the configuration...
setting up /etc...
reloading user units for bs...
reloading the following user units: dbus-broker.service
restarting the following user units: nixos-activation.service
restarting sysinit-reactivation.target
reloading the following units: dbus-broker.service
starting the following units: accounts-daemon.service, polkit.service
the following new units were started: NetworkManager-dispatcher.service
Done. The new configuration is /nix/store/x6skwg4r95y40ikjgpbh6q1ssylgpffp-nixos-system-nixos-main-26.11.20260715.753cc8a
cowsay: ∅ → 3.8.4, +51.2 KiB
What could be causing that?
