From fce6a2b40e12247888bfb221a905d82a97091ad6 Mon Sep 17 00:00:00 2001 From: Adithya Nair Date: Sun, 28 May 2023 22:41:04 +0530 Subject: [PATCH] pin nixpkgs in NIX_PATH and registry --- common/nix.nix | 29 +++++++++++++++++------------ 1 file changed, 17 insertions(+), 12 deletions(-) diff --git a/common/nix.nix b/common/nix.nix index 912c34c..9545cb8 100644 --- a/common/nix.nix +++ b/common/nix.nix @@ -1,15 +1,20 @@ -{...}: { - nix.settings = { - trusted-substituters = [ - "https://nix-community.cachix.org/" - ]; - trusted-public-keys = [ - "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=" - ]; - auto-optimise-store = true; - experimental-features = ["nix-command" "flakes" "auto-allocate-uids" "cgroups" "ca-derivations"]; - auto-allocate-uids = true; - use-cgroups = true; +{nixpkgs, ...}: { + environment.etc."nix/inputs/nixpkgs".source = nixpkgs.outPath; + nix = { + nixPath = ["nixpkgs=/etc/nix/inputs/nixpkgs"]; + registry.nixpkgs.flake = nixpkgs; + settings = { + trusted-substituters = [ + "https://nix-community.cachix.org/" + ]; + trusted-public-keys = [ + "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=" + ]; + auto-optimise-store = true; + experimental-features = ["nix-command" "flakes" "auto-allocate-uids" "cgroups" "ca-derivations"]; + auto-allocate-uids = true; + use-cgroups = true; + }; }; nixpkgs.config.allowUnfree = true; }