38 lines
1.2 KiB
Nix
38 lines
1.2 KiB
Nix
{...}: let
|
|||
|
|
cacheSettings = {
|
||
|
|
substituters = [
|
||
|
|
"https://phundrak.cachix.org?priority=10"
|
||
|
|
"https://nix-community.cachix.org?priority=20"
|
||
|
|
"https://cache.nixos.org?priority=40"
|
||
|
|
];
|
||
|
|
trustedPublicKeys = [
|
||
|
|
"phundrak.cachix.org-1:osJAkYO0ioTOPqaQCIXMfIRz1/+YYlVFkup3R2KSexk="
|
||
|
|
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
|
||
|
|
"cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="
|
||
|
|
];
|
||
|
|
};
|
||
|
|
in {
|
||
|
|
flake-file.nixConfig = {
|
||
|
|
extra-trusted-public-keys = cacheSettings.trustedPublicKeys;
|
||
|
|
extra-substituters = cacheSettings.substituters;
|
||
|
|
extra-experimental-features = ["nix-command" "flakes"];
|
||
|
|
http-connections = 128;
|
||
|
|
};
|
||
|
|
|
||
|
|
flake.nixConfig = {
|
||
|
|
extra-trusted-public-keys = cacheSettings.trustedPublicKeys;
|
||
|
|
extra-substituters = cacheSettings.substituters;
|
||
|
|
extra-experimental-features = ["nix-command" "flakes"];
|
||
|
|
http-connections = 128;
|
||
|
|
};
|
||
|
|
|
||
|
|
flake.modules.nixos.nix-cache-settings = {
|
||
|
|
nix.settings = {
|
||
|
|
substituters = cacheSettings.substituters;
|
||
|
|
trusted-public-keys = cacheSettings.trustedPublicKeys;
|
||
|
|
http-connections = 128;
|
||
|
|
experimental-features = ["nix-command" "flakes"];
|
||
|
|
};
|
||
|
|
};
|
||
|
|
}
|