mirror of
https://github.com/zoriya/flake.git
synced 2026-08-15 18:43:42 +00:00
57 lines
1.4 KiB
Nix
57 lines
1.4 KiB
Nix
{
|
|
pkgs,
|
|
lib,
|
|
inputs,
|
|
config,
|
|
...
|
|
}: {
|
|
nix = {
|
|
# This will add each flake input as a registry
|
|
# To make nix3 commands consistent with your flake
|
|
registry = lib.mapAttrs (_: value: {flake = value;}) inputs;
|
|
|
|
# This will additionally add your inputs to the system's legacy channels
|
|
# Making legacy nix commands consistent as well, awesome!
|
|
nixPath = lib.mapAttrsToList (key: value: "${key}=${value.to.path}") config.nix.registry;
|
|
|
|
settings = {
|
|
auto-optimise-store = true;
|
|
warn-dirty = false;
|
|
experimental-features = ["nix-command" "flakes"];
|
|
use-xdg-base-directories = true;
|
|
substituters = [
|
|
"https://nix-community.cachix.org"
|
|
"https://ghostty.cachix.org"
|
|
];
|
|
trusted-public-keys = [
|
|
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
|
|
"ghostty.cachix.org-1:QB389yTa6gTyneehvqG58y0WnHjQOqgnA+wBnpWWxns="
|
|
];
|
|
};
|
|
gc =
|
|
{
|
|
automatic = true;
|
|
options = "--delete-older-than 14d";
|
|
}
|
|
// (
|
|
if pkgs.stdenv.isLinux
|
|
then {
|
|
dates = "weekly";
|
|
}
|
|
else {
|
|
interval = {
|
|
Weekday = 0;
|
|
Hour = 0;
|
|
Minute = 0;
|
|
};
|
|
}
|
|
);
|
|
extraOptions = ''
|
|
keep-outputs = true
|
|
keep-derivations = true
|
|
'';
|
|
};
|
|
nixpkgs.config.allowUnfree = true;
|
|
nixpkgs.config.android_sdk.accept_license = true;
|
|
}
|