mirror of
https://github.com/Gerg-L/nixos.git
synced 2025-12-10 00:43:56 -05:00
46 lines
1.2 KiB
Nix
46 lines
1.2 KiB
Nix
inputs: {
|
|
lib,
|
|
self,
|
|
settings,
|
|
...
|
|
}: {
|
|
nix = {
|
|
# package = nix.packages.${pkgs.system}.nix;
|
|
#automatically get registry from input flakes
|
|
registry = (
|
|
lib.attrsets.mapAttrs (
|
|
_: value: {
|
|
flake = value;
|
|
}
|
|
) (
|
|
lib.attrsets.filterAttrs (
|
|
_: value: (
|
|
!(lib.attrsets.hasAttrByPath ["flake"] value) || value.flake == false
|
|
)
|
|
)
|
|
inputs
|
|
)
|
|
// {
|
|
nixpkgs.flake = inputs.unstable;
|
|
system.flake = self;
|
|
}
|
|
);
|
|
#automatically add registry entries to nixPath
|
|
nixPath = (lib.mapAttrsToList (name: value: name + "=" + value) inputs) ++ ["system=${self}" "nixpkgs=${inputs.unstable}"];
|
|
settings = {
|
|
experimental-features = ["nix-command" "flakes" "repl-flake"];
|
|
auto-optimise-store = true;
|
|
warn-dirty = false;
|
|
flake-registry = builtins.toFile "empty-flake-registry.json" ''{"flakes":[],"version":2}'';
|
|
keep-outputs = true;
|
|
keep-derivations = true;
|
|
trusted-users = [
|
|
"root"
|
|
"@wheel"
|
|
];
|
|
allowed-users = [
|
|
];
|
|
};
|
|
};
|
|
environment.etc."booted-system".source = self;
|
|
}
|