mirror of
https://github.com/foo-dogsquared/nixos-config.git
synced 2025-02-26 12:19:00 +00:00
hosts/plover: fix credentials permission for Bind service
This commit is contained in:
parent
a4c9add8a7
commit
c3ff202b84
@ -79,7 +79,7 @@ in
|
|||||||
configFile =
|
configFile =
|
||||||
let
|
let
|
||||||
cfg = config.services.bind;
|
cfg = config.services.bind;
|
||||||
certDir = path: "${config.security.acme.certs."${dnsSubdomain}".directory}/${path}";
|
certDir = path: "/run/credentials/bind.service/${path}";
|
||||||
listenInterfaces = lib.concatMapStrings (entry: " ${entry}; ") cfg.listenOn;
|
listenInterfaces = lib.concatMapStrings (entry: " ${entry}; ") cfg.listenOn;
|
||||||
listenInterfacesIpv6 = lib.concatMapStrings (entry: " ${entry}; ") cfg.listenOnIpv6;
|
listenInterfacesIpv6 = lib.concatMapStrings (entry: " ${entry}; ") cfg.listenOnIpv6;
|
||||||
in
|
in
|
||||||
@ -196,6 +196,18 @@ in
|
|||||||
Group = config.users.users.named.group;
|
Group = config.users.users.named.group;
|
||||||
UMask = "0037";
|
UMask = "0037";
|
||||||
|
|
||||||
|
# Get the credentials into the service.
|
||||||
|
LoadCredential =
|
||||||
|
let
|
||||||
|
certDirectory = config.security.acme.certs."${dnsSubdomain}".directory;
|
||||||
|
certCredentialPath = path: "${path}:${certDirectory}/${path}";
|
||||||
|
in
|
||||||
|
[
|
||||||
|
(certCredentialPath "cert.pem")
|
||||||
|
(certCredentialPath "key.pem")
|
||||||
|
(certCredentialPath "fullchain.pem")
|
||||||
|
];
|
||||||
|
|
||||||
# Lock and protect various system components.
|
# Lock and protect various system components.
|
||||||
LockPersonality = true;
|
LockPersonality = true;
|
||||||
PrivateTmp = true;
|
PrivateTmp = true;
|
||||||
@ -300,9 +312,6 @@ in
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
# Setting up DNS-over-TLS by generating a certificate.
|
|
||||||
security.acme.certs."${dnsSubdomain}".group = config.users.users.named.group;
|
|
||||||
|
|
||||||
# Then generate a DH parameter for the application.
|
# Then generate a DH parameter for the application.
|
||||||
security.dhparams.params.bind.bits = 4096;
|
security.dhparams.params.bind.bits = 4096;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user