I’m using the “unstable” channel.
I added the following to my configuration.nix
:
# Automatic upgrades
system.autoUpgrade = {
enable = true;
allowReboot = false; # Do nixos-rebuild switch --upgrade instead
channel = "https://channels.nixos.org/nixos-unstable";
};
Next, I tried to rebuild, but got an error.
✦ ❯ sudo nixos-rebuild switch --upgrade
error: reading symbolic link '/nix/var/nix/profiles/per-user/root/channels/"': No such file or directory
So I commented out the changes that I had made to configuration.nix
, but I’m still getting the error message. I don’t see any problem with the symbolic links in question.
✦ ❯ ls -l /nix/var/nix/profiles/per-user/root/channels/
total 8
lrwxrwxrwx 1 root root 60 Jan 1 1970 manifest.nix -> /nix/store/x8ly1rxc79amaajd92lfim6pjgr5kkbk-env-manifest.nix
lrwxrwxrwx 1 root root 55 Jan 1 1970 nixos -> /nix/store/q3wdxyrjq651dzrg2f3ijgm6a1y87gi2-nixos/nixos
nixos on main [!?]
✦ ❯ ls -l /nix/store/x8ly1rxc79amaajd92lfim6pjgr5kkbk-env-manifest.nix
-r--r--r-- 1 root root 234 Jan 1 1970 /nix/store/x8ly1rxc79amaajd92lfim6pjgr5kkbk-env-manifest.nix
nixos on main [!?]
✦ ❯ ls -l /nix/store/q3wdxyrjq651dzrg2f3ijgm6a1y87gi2-nixos/nixos
total 12936
-r--r--r-- 1 root root 36284 Jan 1 1970 CONTRIBUTING.md
-r--r--r-- 1 root root 1097 Jan 1 1970 COPYING
-r--r--r-- 1 root root 971 Jan 1 1970 default.nix
dr-xr-xr-x 1 root root 588 Jan 1 1970 doc
-r--r--r-- 1 root root 2661 Jan 1 1970 flake.nix
dr-xr-xr-x 1 root root 796 Jan 1 1970 lib
dr-xr-xr-x 1 root root 96 Jan 1 1970 maintainers
dr-xr-xr-x 1 root root 208 Jan 1 1970 nixos
lrwxrwxrwx 1 root root 1 Jan 1 1970 nixpkgs -> .
dr-xr-xr-x 1 root root 286 Jan 1 1970 pkgs
-r--r--r-- 1 root root 13180928 Jan 1 1970 programs.sqlite
-r--r--r-- 1 root root 5186 Jan 1 1970 README.md
-r--r--r-- 1 root root 20 Jan 1 1970 svn-revision
I ran nix store verify --all
; no problems reported.
Just to be sure that I had the channel set properly, I did:
✦ ❯ sudo nix-channel --add https://channels.nixos.org/nixos-unstable nixos
✦ ❯ sudo nix-channel --list | grep nixos
But I still get the error message when I do nixos-rebuild
.