50 lines
1.3 KiB
Nix
50 lines
1.3 KiB
Nix
{
|
|
lib,
|
|
outputs,
|
|
...
|
|
}:
|
|
{
|
|
# Apply overlays
|
|
nixpkgs = {
|
|
# TODO: apply this to hm and nixos without duplicate code
|
|
overlays = builtins.attrValues outputs.overlays;
|
|
config = {
|
|
nvidia.acceptLicense = true;
|
|
allowUnfree = true;
|
|
allowUnfreePredicate = _: true; # TODO: what is this
|
|
warn-dirty = false;
|
|
permittedInsecurePackages = [
|
|
"olm-3.2.16"
|
|
];
|
|
};
|
|
};
|
|
|
|
# optimize at every build, slows down builds
|
|
# better to do optimise.automatic for regular optimising
|
|
# nix.settings.auto-optimise-store = lib.mkDefault true;
|
|
nix.settings.experimental-features = [
|
|
"nix-command"
|
|
"flakes"
|
|
"ca-derivations"
|
|
];
|
|
# warn-dirty = false;
|
|
|
|
nix.gc = {
|
|
automatic = true;
|
|
dates = "weekly";
|
|
options = "--delete-older-than 30d";
|
|
};
|
|
nix.optimise = {
|
|
automatic = true;
|
|
dates = [ "weekly" ]; # Optional; allows customizing optimisation schedule
|
|
};
|
|
|
|
programs.nix-ld.enable = true;
|
|
|
|
# TODO: is this useful?, what does it do?
|
|
# nix.settings.flake-registry = ""; # Disable global flake registry
|
|
# 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;
|
|
}
|