with the option “system.autoUpgrade.enable” set to true, the systemd service nixos-upgrade runs every morning.
For some weeks now, nixos-upgrade-start never finishes. It looks like this in the systemd journal
Oct 09 06:24:50 nixos nixos-upgrade-start[2067]: unpacking channels...
Oct 09 06:25:05 nixos nixos-upgrade-start[2064]: building Nix...
Oct 09 06:25:07 nixos nixos-upgrade-start[2064]: building the system configuration...
Oct 09 06:25:15 nixos nixos-upgrade-start[3495]: these 75 derivations will be built:
Oct 09 06:25:15 nixos nixos-upgrade-start[3495]: /nix/store/rr1w5qjgrb4i9jzmyp6a126ai4m2vi0v-nixos-manual-html.drv
Oct 09 06:25:15 nixos nixos-upgrade-start[3495]: /nix/store/qnb19cj3kpicfi1qyj4ajx0c6bva9w8a-nixos-help.drv
...
Oct 09 06:25:15 nixos nixos-upgrade-start[3495]: /nix/store/z18qhls522p5ibxvpsjr2zsa8bzp305n-etc.drv
Oct 09 06:25:15 nixos nixos-upgrade-start[3495]: /nix/store/02kpp0hwb1vrrscld6c0avnmxbjbl9kx-nixos-system-nixos-24.11pre689866.c31898adf5a8.drv
Oct 09 06:25:15 nixos nixos-upgrade-start[3495]: these 131 paths will be fetched (697.48 MiB download, 2756.61 MiB unpacked):
Oct 09 06:25:15 nixos nixos-upgrade-start[3495]: /nix/store/qwihdlimf5i5vz0qh1krwvl48r0nyap9-NetworkManager-openconnect-1.2.10
Oct 09 06:25:15 nixos nixos-upgrade-start[3495]: /nix/store/pxll2b2hrabvk35g6s3hk6mvv4irkcdm-acl-2.3.2-dev
...
Oct 09 06:25:15 nixos nixos-upgrade-start[3495]: /nix/store/nfawjwhk4n8cf66x1y4m48q0m52b2v2s-xkb-validated
Oct 09 06:25:15 nixos nixos-upgrade-start[3495]: /nix/store/igscl1v34aip3n288afmbx5254cy1z9v-yasm-1.3.0
Oct 09 06:25:15 nixos nixos-upgrade-start[3495]: copying path '/nix/store/ky4ws19vayymrp956spiyijkypsvi9mj-linux-6.6.54' from 'https://cache.nixos.org'...
...
Oct 09 06:28:24 nixos nixos-upgrade-start[3495]: building '/nix/store/mbb1k82wqy00g3qh2j40daxm3h5vyb90-etc-man_db.conf.drv'...
Oct 09 06:28:25 nixos nixos-upgrade-start[3495]: building '/nix/store/z18qhls522p5ibxvpsjr2zsa8bzp305n-etc.drv'...
Oct 09 06:28:26 nixos nixos-upgrade-start[3495]: building '/nix/store/02kpp0hwb1vrrscld6c0avnmxbjbl9kx-nixos-system-nixos-24.11pre689866.c31898adf5a8.drv'...
#
# it just hangs there (no matter how long I wait)...
# the upgrade is visible in /nix/var/nix/profiles/
# so at this point I just kill the process
#
Oct 09 06:49:00 nixos nixos-upgrade-start[2064]: Terminated
Oct 09 06:49:01 nixos nixos-upgrade-start[55615]: stopping the following units: accounts-daemon.service, nscd.service, nvidia-container-toolkit-cdi-generator.service, systemd-udevd-control.socket, systemd-udevd-kernel.socket, systemd-udevd.service
Oct 09 06:49:02 nixos nixos-upgrade-start[55615]: NOT restarting the following changed units: libvirt-guests.service
Oct 09 06:49:02 nixos nixos-upgrade-start[55615]: activating the configuration...
Oct 09 06:49:02 nixos nixos-upgrade-start[61995]: setting up /etc...
Oct 09 06:49:02 nixos nixos-upgrade-start[55615]: reloading user units for oo...
Oct 09 06:49:03 nixos nixos-upgrade-start[55615]: restarting sysinit-reactivation.target
Oct 09 06:49:03 nixos nixos-upgrade-start[55615]: reloading the following units: dbus.service
Oct 09 06:49:03 nixos nixos-upgrade-start[55615]: restarting the following units: polkit.service
Oct 09 06:49:03 nixos nixos-upgrade-start[55615]: starting the following units: accounts-daemon.service, nscd.service, nvidia-container-toolkit-cdi-generator.service, systemd-udevd-control.socket, systemd-udevd-kernel.socket
Oct 09 06:49:03 nixos nixos-upgrade-start[55615]: the following new units were started: libvirtd.service, run-credentials-systemd\x2dtmpfiles\x2dresetup.service.mount, sysinit-reactivation.target, systemd-tmpfiles-resetup.service
I can’t remember when I started noticing this. This didn’t use to happen several months back.
$ nix-shell -p nix-info --run "nix-info -m"
- system: `"x86_64-linux"`
- host os: `Linux 6.6.53, NixOS, 24.11 (Vicuna), 24.11pre689866.c31898adf5a8`
- multi-user?: `yes`
- sandbox: `yes`
- version: `nix-env (Nix) 2.18.8`
- channels(root): `"nixos"`
- channels(oo): `"nixpkgs"`
- nixpkgs: `/home/oo/.nix-defexpr/channels/nixpkgs`
Is this a bug? Do I have to configure something extra?