NixOS: Setting the default channel in configuration.nix -


how set default channel in nixos's /etc/configuration.nix?

there command set , rebuild with

sudo nix-channel --add https://nixos.org/channels/nixpkgs-unstable sudo nixos-rebuild switch -i nixpkgs=/nix/var/nix/profiles/per-user/root/channels/nixpkgs 

but i'd have setup in configuration.nix don't have remember how everytime. thanks!

set nixpath = [ "nixpkgs=http://nixos.org/channels/nixos-unstable/nixexprs.tar.xz" ];, see https://github.com/snabblab/snabblab-nixos/blob/master/modules/common.nix#l37


Comments