diff --git a/base.nix b/base.nix index 33bd09b4..87d1c806 100644 --- a/base.nix +++ b/base.nix @@ -1,4 +1,4 @@ -{ config, pkgs, ... }: +{ config, pkgs, inputs, ... }: { imports = [ @@ -29,6 +29,17 @@ nix.settings.experimental-features = [ "nix-command" "flakes" ]; + /* This makes commandline tools like + ** nix run nixpkgs#hello + ** and nix-shell -p hello + ** use the same channel the system + ** was built with + */ + nix.registry = { + nixpkgs.flake = inputs.nixpkgs; + }; + nix.nixPath = [ "nixpkgs=${inputs.nixpkgs}" ]; + environment.systemPackages = with pkgs; [ file git diff --git a/flake.nix b/flake.nix index 789e4843..772f4f33 100644 --- a/flake.nix +++ b/flake.nix @@ -22,7 +22,7 @@ nixosConfigurations = { jokum = nixpkgs.lib.nixosSystem { system = "x86_64-linux"; - specialArgs = { inherit unstable; }; + specialArgs = { inherit unstable inputs; }; modules = [ ./hosts/jokum/configuration.nix sops-nix.nixosModules.sops