nix: use vars some more

This commit is contained in:
surtur 2023-11-21 22:14:04 +01:00
parent d125d70562
commit c90bd1553e
Signed by: wanderer
SSH Key Fingerprint: SHA256:MdCZyJ2sHLltrLBp0xQO0O1qTW9BT/xl5nXkDvhlMCI
4 changed files with 6 additions and 8 deletions

@ -1,5 +1,4 @@
{config, ...}:
let
{config, ...}: let
svc = "coredns.service";
usr = "${toString config.users.users.coredns.name}";
in {

@ -1,5 +1,4 @@
{config, ...}:
let
{config, ...}: let
svc = "coredns.service";
usr = "${toString config.users.users.coredns.name}";
in {

@ -235,7 +235,7 @@ in {
ProtectSystem = "strict";
LimitNOFILE = 1048576;
LimitNPROC = 512;
User = "coredns";
User = usr;
EnvironmentFile = config.sops.templates.corednsEnv.path;
# LoadCredential = lib.mapAttrsToList (name: path: "${name}:${path}") cfg.credentials;
DeviceAllow = "";
@ -275,8 +275,8 @@ in {
};
users.users.coredns = {
group = "coredns";
home = "/etc/coredns";
group = usr;
home = "/etc/" + usr;
createHome = false;
isSystemUser = true;
extraGroups = ["users"];

@ -124,7 +124,7 @@ in {
};
systemd.services.dnscrypt-proxy2.serviceConfig = {
StateDirectory = "dnscrypt-proxy";
StateDirectory = usr;
WorkingDirectory = "/";
# StartLimitIntervalSec = 5;
StartLimitBurst = 10;