Skip to content

Commit

Permalink
system/nix: filter out non-flake inputs from system flake registry (#43)
Browse files Browse the repository at this point in the history
  • Loading branch information
zmazanv authored Sep 11, 2024
1 parent 2654375 commit 5483d2e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions system/nix/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,13 @@
# we need git for flakes
environment.systemPackages = [pkgs.git];

nix = {
nix = let
flakeInputs = lib.filterAttrs (_: v: lib.isType "flake" v) inputs;
in {
package = pkgs.lix;

# pin the registry to avoid downloading and evaling a new nixpkgs version every time
registry = lib.mapAttrs (_: v: {flake = v;}) inputs;
registry = lib.mapAttrs (_: v: {flake = v;}) flakeInputs;

# set the path for channels compat
nixPath = lib.mapAttrsToList (key: _: "${key}=flake:${key}") config.nix.registry;
Expand Down

0 comments on commit 5483d2e

Please sign in to comment.