mirror of
https://github.com/RichieCahill/dotfiles.git
synced 2026-04-17 13:08:19 -04:00
29 lines
644 B
Nix
29 lines
644 B
Nix
{
|
|
inputs,
|
|
lib,
|
|
...
|
|
}: let
|
|
flakeInputs = lib.filterAttrs (_: lib.isType "flake") inputs;
|
|
in {
|
|
nix = {
|
|
settings = {
|
|
trusted-users = [
|
|
"root"
|
|
"@wheel"
|
|
];
|
|
auto-optimise-store = lib.mkDefault true;
|
|
experimental-features = [
|
|
"nix-command"
|
|
"flakes"
|
|
"ca-derivations"
|
|
];
|
|
warn-dirty = false;
|
|
flake-registry = ""; # disable global flake registries
|
|
};
|
|
|
|
# Add each flake input as a registry and nix_path
|
|
registry = lib.mapAttrs (_: flake: {inherit flake;}) flakeInputs;
|
|
nixPath = lib.mapAttrsToList (n: _: "${n}=flake:${n}") flakeInputs;
|
|
};
|
|
}
|