mirror of
https://github.com/SebastianStork/nixos-config.git
synced 2026-03-22 15:29:07 +01:00
Compare commits
No commits in common. "def00d7a52978de33212dbdfe4d56ff3fa3a28b4" and "7a429c5177440a38b79433a89e460df79b37a980" have entirely different histories.
def00d7a52
...
7a429c5177
3 changed files with 8 additions and 23 deletions
|
|
@ -13,12 +13,6 @@ let
|
|||
publicHostsExist = virtualHosts |> lib.any (vHost: (!self.lib.isPrivateDomain vHost.domain));
|
||||
privateHostsExist = virtualHosts |> lib.any (vHost: self.lib.isPrivateDomain vHost.domain);
|
||||
|
||||
privateDomains =
|
||||
virtualHosts
|
||||
|> lib.filter (vHost: self.lib.isPrivateDomain vHost.domain)
|
||||
|> lib.map (vHost: vHost.domain)
|
||||
|> lib.unique;
|
||||
|
||||
mkVirtualHost =
|
||||
{
|
||||
domain,
|
||||
|
|
@ -144,7 +138,11 @@ in
|
|||
reloadServices = [ "caddy.service" ];
|
||||
};
|
||||
|
||||
certs = privateDomains |> lib.map (domain: lib.nameValuePair domain { }) |> lib.listToAttrs;
|
||||
certs =
|
||||
virtualHosts
|
||||
|> lib.filter (host: self.lib.isPrivateDomain host.domain)
|
||||
|> lib.map (host: lib.nameValuePair host.domain { })
|
||||
|> lib.listToAttrs;
|
||||
};
|
||||
|
||||
services.nebula.networks.mesh.firewall.inbound = [
|
||||
|
|
@ -162,11 +160,7 @@ in
|
|||
|
||||
systemd.services.caddy = {
|
||||
requires = [ netCfg.overlay.systemdUnit ];
|
||||
wants = privateDomains |> lib.map (domain: "acme-${domain}.service");
|
||||
after = [
|
||||
netCfg.overlay.systemdUnit
|
||||
]
|
||||
++ (privateDomains |> lib.map (domain: "acme-${domain}.service"));
|
||||
after = [ netCfg.overlay.systemdUnit ];
|
||||
};
|
||||
|
||||
custom.persistence.directories = [ "/var/lib/acme" ];
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ let
|
|||
|> lib.map (host: {
|
||||
type = "monitor";
|
||||
cache = "1m";
|
||||
title = "${host.config.networking.hostName} Services";
|
||||
title = host.config.networking.hostName;
|
||||
sites =
|
||||
host.config.custom.meta.sites
|
||||
|> lib.attrValues
|
||||
|
|
|
|||
|
|
@ -34,16 +34,7 @@ in
|
|||
};
|
||||
};
|
||||
|
||||
systemd.services.scrutiny = {
|
||||
enableStrictShellChecks = false;
|
||||
serviceConfig = {
|
||||
DynamicUser = lib.mkForce false;
|
||||
ProtectSystem = "strict";
|
||||
ProtectHome = "read-only";
|
||||
PrivateTmp = true;
|
||||
RemoveIPC = true;
|
||||
};
|
||||
};
|
||||
systemd.services.scrutiny.enableStrictShellChecks = false;
|
||||
|
||||
custom = {
|
||||
services.caddy.virtualHosts.${cfg.domain}.port = cfg.port;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue