nix: export the CI server as nixosModules.cc-ci-server
continuous-integration/drone/push Build is failing
continuous-integration/drone/push Build is failing
The whole server (every service module, the harness tooling, sops wiring, acme-dns) becomes one reusable module, nix/modules/default.nix, so another flake can run cc-ci on a host it defines. First consumer: the cc-ci-orchestrator repo's `#cc-ci` host, which runs the CI server and the orchestrator together on one Hetzner machine. Two things the modules hard-coded become options (nix/modules/options.nix): - cc-ci.publicIPv4 — acme-dns's listen address and ns-acme glue record. - cc-ci.sopsFile — the secrets.yaml path; defaults to the secrets/ submodule, but a consumer that imports cc-ci as a plain input (no private submodule) points it at the deployed --recursive checkout and sops-nix reads it at activation (validateSopsFiles off for that case). The standalone host (nix/hosts/cc-ci-hetzner) now only carries hardware, networking and identity and imports the module via the flake. Verified: the `#cc-ci` system derivation is byte-identical before and after (/nix/store/ckp1244bz86fz3qbx81n5kx60c1lak3m-…531670d.drv on both). Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FqkQq3CDmFWcQ7u1LzoyRz
This commit is contained in:
@@ -3,18 +3,19 @@
|
||||
# This host is authoritative only for acme.commoninternet.net. Gandi continues
|
||||
# to own commoninternet.net; it delegates this narrow zone and one permanent
|
||||
# _acme-challenge CNAME manually. No Gandi credential is present here.
|
||||
{ pkgs, ... }:
|
||||
{ config, pkgs, ... }:
|
||||
let
|
||||
publicIPv4 = config.cc-ci.publicIPv4;
|
||||
acmeDnsConfig = pkgs.writeText "cc-ci-acme-dns.conf" ''
|
||||
[general]
|
||||
listen = "91.98.47.73:53"
|
||||
listen = "${publicIPv4}:53"
|
||||
protocol = "both4"
|
||||
domain = "acme.commoninternet.net"
|
||||
nsname = "ns-acme.commoninternet.net"
|
||||
nsadmin = "hostmaster.commoninternet.net"
|
||||
records = [
|
||||
"acme.commoninternet.net. NS ns-acme.commoninternet.net.",
|
||||
"ns-acme.commoninternet.net. A 91.98.47.73",
|
||||
"ns-acme.commoninternet.net. A ${publicIPv4}",
|
||||
]
|
||||
debug = false
|
||||
|
||||
@@ -48,6 +49,8 @@ let
|
||||
'';
|
||||
in
|
||||
{
|
||||
imports = [ ./options.nix ];
|
||||
|
||||
users.groups.acme-dns = { };
|
||||
users.users.acme-dns = {
|
||||
isSystemUser = true;
|
||||
|
||||
Reference in New Issue
Block a user