2022-06-28 10:44:10 +00:00
|
|
|
{ lib, config, ... }:
|
|
|
|
|
|
|
|
with lib;
|
|
|
|
let
|
2022-08-01 07:23:49 +00:00
|
|
|
cfg = config.sane.nixcache;
|
2022-06-28 10:44:10 +00:00
|
|
|
in
|
|
|
|
{
|
|
|
|
options = {
|
2022-08-01 07:23:49 +00:00
|
|
|
sane.nixcache.enable = mkOption {
|
2022-06-28 10:44:10 +00:00
|
|
|
default = false;
|
|
|
|
type = types.bool;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2022-07-06 21:16:09 +00:00
|
|
|
config = mkIf cfg.enable {
|
2022-06-28 10:44:10 +00:00
|
|
|
# use our own binary cache
|
2022-07-06 21:16:09 +00:00
|
|
|
nix.settings = {
|
2022-06-28 10:44:10 +00:00
|
|
|
substituters = [
|
|
|
|
"https://nixcache.uninsane.org"
|
2022-09-14 21:45:33 +00:00
|
|
|
"http://desko:5000"
|
2022-06-28 10:44:10 +00:00
|
|
|
"https://nix-community.cachix.org"
|
|
|
|
"https://cache.nixos.org/"
|
|
|
|
];
|
|
|
|
trusted-public-keys = [
|
|
|
|
"nixcache.uninsane.org:r3WILM6+QrkmsLgqVQcEdibFD7Q/4gyzD9dGT33GP70="
|
2022-09-14 21:45:33 +00:00
|
|
|
"desko:Q7mjjqoBMgNQ5P0e63sLur65A+D4f3Sv4QiycDIKxiI="
|
2022-06-28 10:44:10 +00:00
|
|
|
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
|
|
|
|
];
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|