nixos/dnscrypt-proxy: inline top-level binding (cleanup)
This commit is contained in:
parent
c6da2c7c2b
commit
563c8e1496
@ -3,8 +3,9 @@ with lib;
|
|||||||
|
|
||||||
let
|
let
|
||||||
apparmorEnabled = config.security.apparmor.enable;
|
apparmorEnabled = config.security.apparmor.enable;
|
||||||
dnscrypt-proxy = pkgs.dnscrypt-proxy;
|
|
||||||
cfg = config.services.dnscrypt-proxy;
|
cfg = config.services.dnscrypt-proxy;
|
||||||
|
|
||||||
stateDirectory = "/var/lib/dnscrypt-proxy";
|
stateDirectory = "/var/lib/dnscrypt-proxy";
|
||||||
|
|
||||||
localAddress = "${cfg.localAddress}:${toString cfg.localPort}";
|
localAddress = "${cfg.localAddress}:${toString cfg.localPort}";
|
||||||
@ -195,7 +196,7 @@ in
|
|||||||
|
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
NonBlocking = "true";
|
NonBlocking = "true";
|
||||||
ExecStart = "${dnscrypt-proxy}/bin/dnscrypt-proxy ${toString daemonArgs}";
|
ExecStart = "${pkgs.dnscrypt-proxy}/bin/dnscrypt-proxy ${toString daemonArgs}";
|
||||||
|
|
||||||
User = "dnscrypt-proxy";
|
User = "dnscrypt-proxy";
|
||||||
|
|
||||||
@ -208,7 +209,7 @@ in
|
|||||||
|
|
||||||
(mkIf apparmorEnabled {
|
(mkIf apparmorEnabled {
|
||||||
security.apparmor.profiles = singleton (pkgs.writeText "apparmor-dnscrypt-proxy" ''
|
security.apparmor.profiles = singleton (pkgs.writeText "apparmor-dnscrypt-proxy" ''
|
||||||
${dnscrypt-proxy}/bin/dnscrypt-proxy {
|
${pkgs.dnscrypt-proxy}/bin/dnscrypt-proxy {
|
||||||
/dev/null rw,
|
/dev/null rw,
|
||||||
/dev/urandom r,
|
/dev/urandom r,
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user