dotfiles/nixos/modules/lumi-cache.nix

19 lines
535 B
Nix
Raw Permalink Normal View History

2022-04-11 13:26:26 +02:00
{ config, lib, pkgs, ... }:
let
cfg = config.yorick.lumi-cache;
in {
options.yorick.lumi-cache = with lib; {
enable = mkEnableOption "lumi cache";
};
config = lib.mkIf cfg.enable {
2022-05-18 15:57:58 +02:00
age.secrets.nix-netrc.file = ../../secrets/nix-netrc.age;
nix.settings = {
substituters = [ "https://cache.lumi.guide/?priority=50" ];
2024-02-17 15:14:16 +01:00
netrc-file = lib.mkForce config.age.secrets.nix-netrc.path;
trusted-public-keys = [
2022-04-11 13:26:26 +02:00
"cache.lumi.guide-1:z813xH+DDlh+wvloqEiihGvZqLXFmN7zmyF8wR47BHE="
];
};
};
}