feat(attic): extract attic to service module, add cache host, configure reverse proxy/DNS
Some checks failed
Build / build (Development) (push) Has been cancelled
Build / Determining hosts to build (push) Failing after 11m22s
Build / build (Testing) (push) Has been cancelled

This commit is contained in:
Tibo De Peuter 2026-03-17 21:46:44 +01:00
parent ccfa328771
commit de1ee54b8b
Signed by: tdpeuter
GPG key ID: 38297DE43F75FFE2
8 changed files with 213 additions and 2 deletions

View file

@ -1,12 +1,14 @@
{
imports = [
./secrets.nix
./substituters.nix
];
config = {
homelab = {
services.openssh.enable = true;
users.admin.enable = true;
common.substituters.enable = true;
};
nix.settings.experimental-features = [

View file

@ -0,0 +1,28 @@
{ config, lib, pkgs, inputs, ... }:
let
cfg = config.homelab.common.substituters;
in {
options.homelab.common.substituters = {
enable = lib.mkEnableOption "Binary cache substituters";
domain = lib.mkOption {
type = lib.types.str;
default = inputs.self.nixosConfigurations.BinaryCache.config.homelab.services.attic.domain;
description = "The domain name of the binary cache.";
};
publicKey = lib.mkOption {
type = lib.types.nullOr lib.types.str;
default = null;
description = "The public key of the Attic cache (e.g., 'homelab:...')";
};
};
config = lib.mkIf cfg.enable {
nix.settings = {
substituters = [
"https://${cfg.domain}"
];
trusted-public-keys = lib.optional (cfg.publicKey != null) cfg.publicKey;
};
};
}