caddy files

This commit is contained in:
Casper V. Kristensen 2024-04-24 02:06:04 +02:00
parent 8bce4b0326
commit 931bce3d9f
4 changed files with 38 additions and 26 deletions

View file

@ -1,5 +1,6 @@
{lib, ...}: {
security.acme.certs."caspervk.net" = {
security.acme.certs = {
"caspervk.net" = {
domain = "*.caspervk.net";
reloadServices = [
"caddy.service"
@ -10,6 +11,7 @@
# since we handle the group membership manually.
group = lib.mkForce "acme";
};
};
users.groups.acme.members = [
"caddy"
"murmur"

View file

@ -1,11 +1,13 @@
{...}: {
security.acme.certs."caspervk.net" = {
security.acme.certs = {
"caspervk.net" = {
domain = "*.caspervk.net";
reloadServices = [
"kresd@1.service"
"kresd@2.service"
];
};
};
users.groups.acme.members = [
"knot-resolver"
];

View file

@ -1,5 +1,6 @@
{lib, ...}: {
security.acme.certs."caspervk.net" = {
security.acme.certs = {
"caspervk.net" = {
domain = "*.caspervk.net";
reloadServices = [
"caddy.service"
@ -9,6 +10,13 @@
# since we handle the group membership manually.
group = lib.mkForce "acme";
};
"sudomail.org" = {
reloadServices = [
"caddy.service"
];
group = lib.mkForce "acme";
};
};
users.groups.acme.members = [
"caddy"
];

View file

@ -20,7 +20,7 @@ lib.mkIf (config.services.caddy.virtualHosts != {}) {
environment.persistence."/nix/persist" = {
directories = [
{
directory = "/var/lib/caddy";
directory = "/var/www/html";
user = "caddy";
group = "caddy";
mode = "0755";