mirror of
https://github.com/moons-14/dotfiles.git
synced 2026-10-06 01:18:30 +09:00
nix cache
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
{ inputs, ... }:
|
||||
{
|
||||
imports = [
|
||||
./audio.nix
|
||||
@@ -11,6 +12,7 @@
|
||||
./locale.nix
|
||||
./network
|
||||
./nix.nix
|
||||
./nixcache-oci.nix
|
||||
./power.nix
|
||||
./quem.nix
|
||||
./secure-boot.nix
|
||||
@@ -18,5 +20,6 @@
|
||||
./user
|
||||
./version.nix
|
||||
./secret.nix
|
||||
inputs.nixcache-oci.nixosModules.default
|
||||
];
|
||||
}
|
||||
|
||||
@@ -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