about summary refs log tree commit diff
path: root/users/wpcarro/nixos/modules/hadrian-cache.nix
blob: 033c03c825b74feb5aee7dbd41581ad61aa053c4 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# If enabled, use Hadrian's Nix cache.
{ config, lib, pkgs, ... }:

{
  options = {
    hadrian.cache.enable = lib.mkEnableOption "Hadrian's binary cache";
  };

  config = lib.mkIf config.hadrian.cache.enable {
    nix.settings.trusted-public-keys = [
      "cache.hadrian.internal:XWdYSn5ZASj6IqZd4nnDBXJmahQEolBrtq9DvSe0UT0="
    ];
    nix.settings.substituters = [
      "http://cache.hadrian.internal"
    ];
  };
}