Nixos upgrade service fail

Just to share my experience.

For some time on my laptop, upgrade was only made manually. I saw nixos-upgrade.service failed.

with --print-build-logs error

In fact, in my configuration.nix the system.autoUpgrade.flags = [ “” ]; was set.

I comment it and the service start properly now.

For advice.

Thanks.

After reboot… fake enjoy…

oct. 17 19:54:52 nixosdell2 nixos-upgrade-start[3683]: error: unrecognised flag ‘–print-build-logs’
oct. 17 19:54:52 nixosdell2 nixos-upgrade-start[3683]: Try ‘nix-build --help’ for more information.
oct. 17 19:54:52 nixosdell2 nixos-upgrade-start[3667]: Command ‘nix-build ‘<nixpkgs/nixos>’ --attr config.system.build.nixos-rebuild --print-build-logs --no-build-output --no-out-link’ returned non>
oct. 17 19:54:52 nixosdell2 systemd[1]: nixos-upgrade.service: Main process exited, code=exited, status=1/FAILURE
oct. 17 19:54:52 nixosdell2 systemd[1]: nixos-upgrade.service: Failed with result ‘exit-code’.
oct. 17 19:54:52 nixosdell2 systemd[1]: Failed to start NixOS Upgrade.

Can you give us your full config and error log (journalctl -u nixos-upgrade.service)?

Thank for answer MartV.

I just read your answer and my first question was: “why he asks for my full config…”

And You were right! You switch on my little brain. :joy:

Don’t know why, I created nix conf for auto upgrade. And for sure a dummy copy/paste with --print-build-logs despite the fact an auto upgrade setup was in configuration.nix

Sorry for spend your time.

Thanks a lot.

No problem, glad it is working now