Skip to content

Commit

Permalink
feat(nix): pin registry
Browse files Browse the repository at this point in the history
  • Loading branch information
nekowinston committed Aug 30, 2023
1 parent 4f23393 commit 817aa71
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 44 deletions.
84 changes: 42 additions & 42 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 9 additions & 2 deletions machines/common/shared/nix.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@
inputs,
pkgs,
...
}: {
}: let
inherit (lib) filterAttrs mkForce;
flakes = filterAttrs (name: value: value ? outputs) inputs;
in {
nixpkgs.config.allowUnfree = true;
nix = {
gc.automatic = true;
Expand All @@ -17,8 +20,12 @@
warn-dirty = false;
}
// ((import ../../../flake.nix).nixConfig);
registry =
builtins.mapAttrs
(name: v: {flake = v;})
flakes;
};

# set nixPath to the flake nixpkgs without channels
environment.variables.NIX_PATH = lib.mkForce "nixpkgs=${inputs.nixpkgs.outPath}";
environment.variables.NIX_PATH = mkForce "nixpkgs=${inputs.nixpkgs.outPath}";
}

0 comments on commit 817aa71

Please sign in to comment.