Files
dotfiles/modules/system/nixcache-oci.nix
T
moons-14 b2283ba328
NixOS CI / Validate flake (push) Has been cancelled
Publish Nix cache / Build and publish uncached paths (push) Has been cancelled
NixOS CI / Build ${{ matrix.host }} (push) Has been cancelled
NixOS CI / Report main status (push) Has been cancelled
nix cache
2026-07-18 20:09:04 +09:00

28 lines
560 B
Nix

{
lib,
config,
...
}:
let
cfg = config.my.system.nixcacheOci;
publicKeyFile = ../../nixcache-public-key.txt;
publicKey =
if builtins.pathExists publicKeyFile then
lib.strings.trim (builtins.readFile publicKeyFile)
else
"";
in
{
options.my.system.nixcacheOci = {
enable = lib.mkEnableOption "Nix binary cache backed by the public GitHub Container Registry";
};
config = lib.mkIf cfg.enable {
services.nixcache-proxy = {
enable = true;
repo = "moons-14/dotfiles";
inherit publicKey;
};
};
}