mirror of
https://github.com/ryan4yin/nixos-and-flakes-book
synced 2024-11-30 07:50:34 +00:00
feat: disable nix channel
This commit is contained in:
parent
d0ce0ffafd
commit
696f57b353
2 changed files with 2 additions and 0 deletions
|
@ -29,6 +29,7 @@ In your NixOS configuration, adding the following module will achieve the mentio
|
|||
{
|
||||
# Make `nix run nixpkgs#nixpkgs` use the same nixpkgs as the one used by this flake.
|
||||
nix.registry.nixpkgs.flake = nixpkgs;
|
||||
nix.channel.enable = false; # disable nix-channel, we use flakes instead.
|
||||
|
||||
# Make `nix repl '<nixpkgs>'` use the same nixpkgs as the one used by this flake.
|
||||
environment.etc."nix/inputs/nixpkgs".source = "${nixpkgs}";
|
||||
|
|
|
@ -30,6 +30,7 @@ Flake Registry 是一个 Flake 注册中心,它可以帮助我们在使用 `ni
|
|||
{
|
||||
# make `nix run nixpkgs#nixpkgs` use the same nixpkgs as the one used by this flake.
|
||||
nix.registry.nixpkgs.flake = nixpkgs;
|
||||
nix.channel.enable = false; # disable nix-channel, we use flakes instead.
|
||||
|
||||
# make `nix repl '<nixpkgs>'` use the same nixpkgs as the one used by this flake.
|
||||
environment.etc."nix/inputs/nixpkgs".source = "${nixpkgs}";
|
||||
|
|
Loading…
Reference in a new issue