From 563c8e14965e15833c465330dfba1d94854285cf Mon Sep 17 00:00:00 2001 From: Joachim Fasting Date: Thu, 9 Mar 2017 17:54:29 +0100 Subject: [PATCH] nixos/dnscrypt-proxy: inline top-level binding (cleanup) --- nixos/modules/services/networking/dnscrypt-proxy.nix | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/nixos/modules/services/networking/dnscrypt-proxy.nix b/nixos/modules/services/networking/dnscrypt-proxy.nix index 82499509963..8520cc5e9eb 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,