mirror of
https://github.com/moons-14/dotfiles.git
synced 2026-10-07 12:14:09 +09:00
nix cache
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
{
|
||||
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;
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user