diff options
author | Joachim Fasting <joachifm@fastmail.fm> | 2017-03-09 17:54:29 +0100 |
---|---|---|
committer | Joachim Fasting <joachifm@fastmail.fm> | 2017-03-10 18:54:50 +0100 |
commit | 563c8e14965e15833c465330dfba1d94854285cf (patch) | |
tree | 747deb0a930aa8e109d38eca0aafaaa90452d2a8 /nixos/modules/services/networking/dnscrypt-proxy.nix | |
parent | c6da2c7c2bec396fe5557d08d595a2f75fea98fc (diff) |
nixos/dnscrypt-proxy: inline top-level binding (cleanup)
Diffstat (limited to 'nixos/modules/services/networking/dnscrypt-proxy.nix')
-rw-r--r-- | nixos/modules/services/networking/dnscrypt-proxy.nix | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/nixos/modules/services/networking/dnscrypt-proxy.nix b/nixos/modules/services/networking/dnscrypt-proxy.nix index 824995099639..8520cc5e9ebc 100644 --- a/nixos/modules/services/networking/dnscrypt-proxy.nix +++ b/nixos/modules/services/networking/dnscrypt-proxy.nix @@ -3,8 +3,9 @@ with lib; let apparmorEnabled = config.security.apparmor.enable; - dnscrypt-proxy = pkgs.dnscrypt-proxy; + cfg = config.services.dnscrypt-proxy; + stateDirectory = "/var/lib/dnscrypt-proxy"; localAddress = "${cfg.localAddress}:${toString cfg.localPort}"; @@ -195,7 +196,7 @@ in serviceConfig = { NonBlocking = "true"; - ExecStart = "${dnscrypt-proxy}/bin/dnscrypt-proxy ${toString daemonArgs}"; + ExecStart = "${pkgs.dnscrypt-proxy}/bin/dnscrypt-proxy ${toString daemonArgs}"; User = "dnscrypt-proxy"; @@ -208,7 +209,7 @@ in (mkIf apparmorEnabled { security.apparmor.profiles = singleton (pkgs.writeText "apparmor-dnscrypt-proxy" '' - ${dnscrypt-proxy}/bin/dnscrypt-proxy { + ${pkgs.dnscrypt-proxy}/bin/dnscrypt-proxy { /dev/null rw, /dev/urandom r, |