Skip to content

Commit c93ba90

Browse files
committed
feat(nix, cli): update nix path
1 parent 5a0647c commit c93ba90

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

nix/modules/cross/nix.nix

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@
2222

2323
let
2424
cfg = config.nix-settings;
25-
2625
hasFull = cfg.use == "full";
2726
isFull = lib.optionals hasFull;
27+
flakeInputs = lib.attrsets.filterAttrs (_: lib.isType "flake") inputs;
2828
in
2929
{
3030
options.nix-settings = {
@@ -62,7 +62,13 @@ in
6262
config = lib.mkIf cfg.enable {
6363
nix =
6464
rec {
65-
nixPath = [ "nixpkgs=${inputs.nixpkgs}" ];
65+
nixPath =
66+
[
67+
"nixpkgs=${inputs.nixpkgs}"
68+
]
69+
++ lib.optionals cfg.inputs-to-registry (
70+
lib.mapAttrsToList (name: flake: "${name}=${flake}") flakeInputs
71+
);
6672

6773
registry =
6874
{
@@ -71,7 +77,7 @@ in
7177
// lib.optionalAttrs cfg.inputs-to-registry (
7278
lib.attrsets.concatMapAttrs (name: flake: {
7379
${name} = { inherit flake; };
74-
}) (lib.attrsets.filterAttrs (_: lib.isType "flake") inputs)
80+
}) flakeInputs
7581
);
7682

7783
settings =

0 commit comments

Comments
 (0)