Skip to content

Commit

Permalink
nixos/dnscrypt-proxy: inline top-level binding (cleanup)
Browse files Browse the repository at this point in the history
  • Loading branch information
joachifm committed Mar 10, 2017
1 parent c6da2c7 commit 563c8e1
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions nixos/modules/services/networking/dnscrypt-proxy.nix
Expand Up @@ -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}";
Expand Down Expand Up @@ -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";

Expand All @@ -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,
Expand Down

0 comments on commit 563c8e1

Please sign in to comment.