about summary refs log tree commit diff
path: root/users/wpcarro/nixos/modules/hadrian-cache.nix
diff options
context:
space:
mode:
authorWilliam Carroll <wpcarro@gmail.com>2022-11-14T17·51-0800
committerclbot <clbot@tvl.fyi>2022-12-12T18·46+0000
commit9166a9915a079e9c7e1a202552f2237121103669 (patch)
tree1bff26971cb4b02bf39e65d6e1ee45a23dd0ef50 /users/wpcarro/nixos/modules/hadrian-cache.nix
parent869b6897becfbf21fb2cdbffe2a127229a8269c3 (diff)
feat(wpcarro/nixos): Support kyoko r/5410
Yet Another NixOS System

Change-Id: I29590c5e7c2a651f3ef56642018649dddd9f06b6
Reviewed-on: https://cl.tvl.fyi/c/depot/+/7297
Reviewed-by: wpcarro <wpcarro@gmail.com>
Tested-by: BuildkiteCI
Reviewed-by: tazjin <tazjin@tvl.su>
Autosubmit: wpcarro <wpcarro@gmail.com>
Diffstat (limited to 'users/wpcarro/nixos/modules/hadrian-cache.nix')
-rw-r--r--users/wpcarro/nixos/modules/hadrian-cache.nix17
1 files changed, 17 insertions, 0 deletions
diff --git a/users/wpcarro/nixos/modules/hadrian-cache.nix b/users/wpcarro/nixos/modules/hadrian-cache.nix
new file mode 100644
index 000000000000..033c03c825b7
--- /dev/null
+++ b/users/wpcarro/nixos/modules/hadrian-cache.nix
@@ -0,0 +1,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"
+    ];
+  };
+}