Files
nixos-config/system/nix.nix
T
2026-11-12 13:26:08 +01:00

27 lines
560 B
Nix

{
config,
lib,
inputs,
...
}:
{
nix =
let
flakeInputs = lib.filterAttrs (_: v: lib.isType "flake" v) inputs;
in
{
# pin the registry to avoid downloading and evaling a new nixpkgs version every time
registry = lib.mapAttrs (_: v: { flake = v; }) flakeInputs;
# set the path for channels compat
nixPath = lib.mapAttrsToList (key: _: "${key}=flake:${key}") config.nix.registry;
settings.experimental-features = [
"nix-command"
"flakes"
];
channels.enable = false;
};
}