1
0
Fork 0

lock nix-path and local flake registry to sytem nixpkgs

This commit is contained in:
Daniel Lovbrotte Olsen 2022-12-09 05:25:07 +01:00
parent 3720b9d20d
commit 6fad2c7854
2 changed files with 13 additions and 2 deletions

View File

@ -1,4 +1,4 @@
{ config, pkgs, ... }: { config, pkgs, inputs, ... }:
{ {
imports = [ imports = [
@ -29,6 +29,17 @@
nix.settings.experimental-features = [ "nix-command" "flakes" ]; 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; [ environment.systemPackages = with pkgs; [
file file
git git

View File

@ -22,7 +22,7 @@
nixosConfigurations = { nixosConfigurations = {
jokum = nixpkgs.lib.nixosSystem { jokum = nixpkgs.lib.nixosSystem {
system = "x86_64-linux"; system = "x86_64-linux";
specialArgs = { inherit unstable; }; specialArgs = { inherit unstable inputs; };
modules = [ modules = [
./hosts/jokum/configuration.nix ./hosts/jokum/configuration.nix
sops-nix.nixosModules.sops sops-nix.nixosModules.sops