nix: use vars some more
This commit is contained in:
parent
d125d70562
commit
c90bd1553e
@ -1,5 +1,4 @@
|
|||||||
{config, ...}:
|
{config, ...}: let
|
||||||
let
|
|
||||||
svc = "coredns.service";
|
svc = "coredns.service";
|
||||||
usr = "${toString config.users.users.coredns.name}";
|
usr = "${toString config.users.users.coredns.name}";
|
||||||
in {
|
in {
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
{config, ...}:
|
{config, ...}: let
|
||||||
let
|
|
||||||
svc = "coredns.service";
|
svc = "coredns.service";
|
||||||
usr = "${toString config.users.users.coredns.name}";
|
usr = "${toString config.users.users.coredns.name}";
|
||||||
in {
|
in {
|
||||||
|
@ -235,7 +235,7 @@ in {
|
|||||||
ProtectSystem = "strict";
|
ProtectSystem = "strict";
|
||||||
LimitNOFILE = 1048576;
|
LimitNOFILE = 1048576;
|
||||||
LimitNPROC = 512;
|
LimitNPROC = 512;
|
||||||
User = "coredns";
|
User = usr;
|
||||||
EnvironmentFile = config.sops.templates.corednsEnv.path;
|
EnvironmentFile = config.sops.templates.corednsEnv.path;
|
||||||
# LoadCredential = lib.mapAttrsToList (name: path: "${name}:${path}") cfg.credentials;
|
# LoadCredential = lib.mapAttrsToList (name: path: "${name}:${path}") cfg.credentials;
|
||||||
DeviceAllow = "";
|
DeviceAllow = "";
|
||||||
@ -275,8 +275,8 @@ in {
|
|||||||
};
|
};
|
||||||
|
|
||||||
users.users.coredns = {
|
users.users.coredns = {
|
||||||
group = "coredns";
|
group = usr;
|
||||||
home = "/etc/coredns";
|
home = "/etc/" + usr;
|
||||||
createHome = false;
|
createHome = false;
|
||||||
isSystemUser = true;
|
isSystemUser = true;
|
||||||
extraGroups = ["users"];
|
extraGroups = ["users"];
|
||||||
|
@ -124,7 +124,7 @@ in {
|
|||||||
};
|
};
|
||||||
|
|
||||||
systemd.services.dnscrypt-proxy2.serviceConfig = {
|
systemd.services.dnscrypt-proxy2.serviceConfig = {
|
||||||
StateDirectory = "dnscrypt-proxy";
|
StateDirectory = usr;
|
||||||
WorkingDirectory = "/";
|
WorkingDirectory = "/";
|
||||||
# StartLimitIntervalSec = 5;
|
# StartLimitIntervalSec = 5;
|
||||||
StartLimitBurst = 10;
|
StartLimitBurst = 10;
|
||||||
|
Loading…
Reference in New Issue
Block a user