acme: going to be a tad mroe selective

This commit is contained in:
silver 2023-08-06 19:56:22 +01:00
parent acb49a2eb1
commit abc355d1b6

View file

@ -1,4 +1,24 @@
{ config, ... }:{ { pkgs, lib, ... }:
with lib;
let
cfg = config.services.skynet_acme;
in {
imports = [];
options.services.skynet_acme = {
enable = mkEnableOption "Skynet Lets Encrypt certs";
domains = lib.mkOption {
default = [ ];
type = lib.types.listOf lib.types.str;
description = ''
A list of domains to use for this server.
'';
};
};
config = {
# group that will own the certificates # group that will own the certificates
users.groups.acme = {}; users.groups.acme = {};
@ -18,12 +38,8 @@
certs = { certs = {
"skynet" = { "skynet" = {
domain = "skynet.ie"; domain = "skynet.ie";
extraDomainNames = [ extraDomainNames = cfg.domains;
"*.skynet.ie" };
"*.minecraft.games.skynet.ie"
"*.pages.skynet.ie"
"api.account.skynet.ie"
];
}; };
}; };
}; };