All checks were successful
nixos / nixos (push) Successful in 1m3s
The test pair served the move to NixOS, which is done. Its overlays, dummy secrets and sops recipients go; the rules for testing on a copy of production stay in nixos/README.md, and git log finds the overlay if it is needed again. Options that existed only for it (alert address, Loki bucket, extra cert-push keys) are inlined, and comments still pointing at Ansible or MIGRATION.md are corrected. The tofu README now spells out the state bucket bootstrap: the bucket is a resource in the state it holds, so a new project needs one local apply first. The bucket gets prevent_destroy for the same reason. Assisted-by: Claude:opus-5-5
32 lines
915 B
Nix
32 lines
915 B
Nix
# Receiving end of xmpp-cert-sync on asxpio-ops (see its file there): the
|
|
# key below may run exactly one command, from ops only.
|
|
{
|
|
config,
|
|
lib,
|
|
pkgs,
|
|
...
|
|
}:
|
|
let
|
|
install = pkgs.writeShellApplication {
|
|
name = "xmpp-cert-install";
|
|
runtimeInputs = [
|
|
pkgs.coreutils
|
|
pkgs.openssl
|
|
pkgs.gnugrep
|
|
pkgs.util-linux
|
|
config.virtualisation.podman.package
|
|
];
|
|
text = builtins.readFile ./xmpp-cert-install.sh;
|
|
};
|
|
in
|
|
{
|
|
options.asxpio.xmppCertSyncKey = lib.mkOption {
|
|
type = lib.types.str;
|
|
default = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAKd1FvOgmxeNCHUJzRQxNA3IBRz59A1VDdsnOwxhybl";
|
|
description = "Public half of xmpp_cert_sync/ssh_key in the ops secrets.";
|
|
};
|
|
|
|
config.users.users.root.openssh.authorizedKeys.keys = map (
|
|
key: ''restrict,from="10.10.0.10",command="${lib.getExe install}" ${key} xmpp-cert-sync''
|
|
) [ config.asxpio.xmppCertSyncKey ];
|
|
}
|