Since a nixos-rebuild switch --upgrade this morning, I can’t do any nix related commands anymore, that want to talk to the demon without using sudo, which again does it in the wrong context then.
The rebuild was done with --update by accident, I actually wanted just add "btrfs" and "exfat" to boot.filesystems and do a switch with reboot, though I took the wrong command from history…
Already during that rebuild, I messages like this passing by (these are from a subsequent run):
Failed to start basic.target: Unit -.mount is masked.
Failed to start graphical.target: Unit -.mount is masked.
Failed to start local-fs.target: Unit boot.mount is masked.
Failed to start multi-user.target: Unit -.mount is masked.
Failed to start swap.target: Unit -.mount is masked.
Now any sudo nixos-rebuild does print also warnings like these multiple times as well as those from above:
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = "",
LC_ALL = (unset),
LANG = "en_DE.UTF-8"
are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
Also my prompt (pwerlevel10k) for zsh isn’t working anymore, though currently I’m not sure if this is related or not.
After I set LANG=en_US.UTF-8, then I won’t see any local related warnings anymore in the current shell session, also my prompt does work in that session.
Related section from /etc/nixos/configuration.nix: