nix: use vars some more
This commit is contained in:
parent
d125d70562
commit
c90bd1553e
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user