diff --git a/lib/colmenaSystem.nix b/lib/colmenaSystem.nix index f5076cde..fc54b39e 100644 --- a/lib/colmenaSystem.nix +++ b/lib/colmenaSystem.nix @@ -23,9 +23,7 @@ in { # make `nix run nixpkgs#nixpkgs` use the same nixpkgs as the one used by this flake. nix.registry.nixpkgs.flake = nixpkgs; - # make `nix repl ''` use the same nixpkgs as the one used by this flake. - environment.etc."nix/inputs/nixpkgs".source = "${nixpkgs}"; - nix.nixPath = ["/etc/nix/inputs"]; + nix.channel.enable = false; # disable nix-channel, we use flakes instead. } ] ++ (if (home-module != null) then [ home-manager.nixosModules.home-manager diff --git a/lib/macosSystem.nix b/lib/macosSystem.nix index 6aa77c50..2cc6e410 100644 --- a/lib/macosSystem.nix +++ b/lib/macosSystem.nix @@ -14,14 +14,15 @@ in modules = darwin-modules ++ [ - { + ({lib, ...}: { # make `nix run nixpkgs#nixpkgs` use the same nixpkgs as the one used by this flake. nix.registry.nixpkgs.flake = nixpkgs; - # make `nix repl ''` use the same nixpkgs as the one used by this flake. environment.etc."nix/inputs/nixpkgs".source = "${nixpkgs}"; - nix.nixPath = ["/etc/nix/inputs"]; - } + # make `nix repl ''` use the same nixpkgs as the one used by this flake. + # discard all the default paths, and only use the one from this flake. + nix.nixPath = lib.mkForce ["/etc/nix/inputs"]; + }) home-manager.darwinModules.home-manager { diff --git a/lib/nixosSystem.nix b/lib/nixosSystem.nix index 0cdc157e..15371319 100644 --- a/lib/nixosSystem.nix +++ b/lib/nixosSystem.nix @@ -17,10 +17,7 @@ in { # make `nix run nixpkgs#nixpkgs` use the same nixpkgs as the one used by this flake. nix.registry.nixpkgs.flake = nixpkgs; - - # make `nix repl ''` use the same nixpkgs as the one used by this flake. - environment.etc."nix/inputs/nixpkgs".source = "${nixpkgs}"; - nix.nixPath = ["/etc/nix/inputs"]; + nix.channel.enable = false; # disable nix-channel, we use flakes instead. } nixos-generators.nixosModules.all-formats