由于缺少nixos通道,nixos重建无法生成

由于缺少nixos通道,nixos重建无法生成,nix,nixos,Nix,Nixos,我想试试查频道。是的 nix-channel --add .../nixos-unstable nix-channel --remove .../nixos-20.09 nix-channel --update 它成功了,它创建了一个链接,我可以运行: nixos-rebuild switch 但是,我的i3停止正常工作,因此我想回到20.09: nix-channel --add .../nixos-20.09 nix-channel --remove .../nixos-unstab

我想试试查频道。是的

nix-channel --add .../nixos-unstable
nix-channel --remove  .../nixos-20.09
nix-channel --update
它成功了,它创建了一个链接,我可以运行:

nixos-rebuild switch
但是,我的i3停止正常工作,因此我想回到20.09:

nix-channel --add .../nixos-20.09
nix-channel --remove  .../nixos-unstable
nix-channel --update
但现在它不会重新创建该链接,也不会在运行时重新创建该链接

nixos-rebuild switch
它失败了

warning: Nix search path entry '/nix/var/nix/profiles/per-user/root/channels/nixos' does not exist, ignoring
error: file 'nixpkgs/nixos' was not found in the Nix search path (add it using $NIX_PATH or -I), at (string):1:13
building Nix...
我已经搜索并尝试了一些对其他人有用的解决方案,比如重新启动,用
sudo-I运行t
,但到目前为止没有任何效果。如何重新创建该链接?

好的,我找到了一种方法: 我添加了一个不同名称的频道,而不是默认的nixos-10.09

nix-channel --add ..../nixos-20.09 nixos
nix-channel --remove nixos-20.09 
nix-channnel --update 

你瞧,链接被创建了,所有的工作又开始了

该错误似乎表明您没有
nixos
频道。也许它不知怎么被移除了。因此,添加一个名为
nixos
的频道可以解决这个问题。