Get basic nginx and acme setup working
All checks were successful
/ dev-shell (push) Successful in 1m18s
/ rust-packages (push) Successful in 2m54s
/ check (push) Successful in 3m21s
/ terraform-providers (push) Successful in 9m33s
/ systems (push) Successful in 8m34s

This should enable DNS-01 acme for all khs openstack servers,
thus removing the pain of setting up acme for those servers.

Do note that this might not really be needed that much anymore,
as I should be able to hit them over IPv6, but for ease of mind,
this will enable ACME trivially, also for non https workloads, as well
as servers without open ports.

Do note that currently there's a global unifi firewall rule in place to
allow port 80 and 443 to my own servers over ipv6, I'd like to remove this
and have Nix configure firewall rules for each server individually, as
requested in the setup.
This commit is contained in:
Kaare Hoff Skovgaard 2025-07-11 00:38:31 +02:00
parent 365b16c380
commit c402ada8f7
Signed by: khs
GPG key ID: C7D890804F01E9F0
13 changed files with 184 additions and 101 deletions

View file

@ -232,13 +232,22 @@ unsafe fn execvpe<SA: AsRef<CStr>, SEK: AsRef<OsStr>, SEV: AsRef<OsStr>>(
args: &[SA],
environ: &[(SEK, SEV)],
) -> anyhow::Result<Infallible> {
let environ: Vec<_> = environ
let environ = environ
.iter()
.map(|(k, v)| {
CString::new(Format!("{k}={v}"))
.with_context(|| format!("Environment variable {k} contains null bytes"))?
CString::new(format!(
"{k}={v}",
k = k.as_ref().display(),
v = v.as_ref().display()
))
.with_context(|| {
format!(
"Environment variable {k} contains null bytes",
k = k.as_ref().display()
)
})
})
.collect();
.collect::<anyhow::Result<Vec<CString>>>()?;
Ok(nix::unistd::execvpe(filename, args, &environ)?)
}