rpi4: Configure ACME certificate provisioning
This commit is contained in:
parent
ca31450524
commit
a5b51d43c1
@ -8,10 +8,9 @@
|
||||
imports =
|
||||
[ # Include the results of the hardware scan.
|
||||
./hardware-configuration.nix
|
||||
./services.nix
|
||||
];
|
||||
|
||||
age.secrets.cloudflaredns.file = ../../secrets/cloudflare-dns.age;
|
||||
|
||||
fileSystems = let
|
||||
mounts = [ "/nix" "/" "/.btrfsroot" "/home" ];
|
||||
fn = (x: { options = [ "compress=zstd" ];});
|
||||
|
44
hosts/rpi4/services.nix
Normal file
44
hosts/rpi4/services.nix
Normal file
@ -0,0 +1,44 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
{
|
||||
config = {
|
||||
|
||||
users.groups.secrets = {};
|
||||
users.users.acme.extraGroups = [ "secrets" ];
|
||||
|
||||
age.secrets.cloudflaredns = {
|
||||
file = ../../secrets/cloudflare-dns.age;
|
||||
group = "secrets";
|
||||
};
|
||||
|
||||
|
||||
security.acme = {
|
||||
acceptTerms = true;
|
||||
maxConcurrentRenewals = 1;
|
||||
defaults = {
|
||||
};
|
||||
|
||||
certs = {
|
||||
"protogen.io" = {
|
||||
credentialFiles = {
|
||||
CLOUDFLARE_EMAIL_FILE = pkgs.writeTextFile "cloudflare-email" ''
|
||||
iancoguz@gmail.com
|
||||
'';
|
||||
CLOUDFLARE_API_KEY_FILE = config.age.secrets.cloudflaredns.path;
|
||||
};
|
||||
|
||||
dnsProvider = "cloudflare";
|
||||
domain = "protogen.io";
|
||||
extraDomainNames = [
|
||||
"*.protogen.io"
|
||||
"nullbite.com"
|
||||
"*.nullbite.com"
|
||||
"nullbite.dev"
|
||||
"*.nullbite.dev"
|
||||
"nbt.sh"
|
||||
"*.nbt.sh"
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user