Add hydra binary cache option

This commit is contained in:
Sandro - 2023-01-04 23:23:25 +01:00
parent 418156fa13
commit 324b4aeb69
Signed by: sandro
GPG Key ID: 3AF5A43A3EECC2E5
2 changed files with 18 additions and 0 deletions

View File

@ -26,6 +26,7 @@ Add or merge the following settings to your `flake.nix`:
- `c3d2.addKnownHosts`: set to true to add the public ssh host keys to the known_hosts file.
- `c3d2.audioStreaming`: set to true to enable all services to audio stream to pulsebert, dacbert or glotzbert in hq.
After enabling this option run ``systemctl --user restart pulseaudio`` or ``systemctl --user restart pipewire-pulse``.
- `c3d2.addBinaryCache`: set to true to add the [c3d2 hydra](https://hydra.hq.c3d2.de/) as permanent trusted-substituter.
## Design

17
modules/binary-cache.nix Normal file
View File

@ -0,0 +1,17 @@
{ config, lib, libS, ... }:
let
cfg = config.c3d2.addBinaryCache;
in
{
options = {
c3d2.addBinaryCache = libS.mkOpinionatedOption "add hydra.hq.c3d2.de as a trusted substituter";
};
config = lib.mkIf cfg {
nix.settings = {
trusted-public-keys = [ "nix-serve.hq.c3d2.de:KZRGGnwOYzys6pxgM8jlur36RmkJQ/y8y62e52fj1ps=" ];
trusted-substituters = [ "https://nix-serve.hq.c3d2.de" ];
};
};
}