Commit 6930dd3d authored by Tomas Kala's avatar Tomas Kala
Browse files

nixos/blocky: Add an option for the package to be used

Previously, the blocky package was hardcoded to the one in pkgs. This
change allows to set it, so the user can configure the blocky service to
run blocky from nixpkgs-unstable, for example.
parent 7a6b9473
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -12,6 +12,8 @@ in
  options.services.blocky = {
    enable = mkEnableOption "blocky, a fast and lightweight DNS proxy as ad-blocker for local network with many features";

    package = mkPackageOption pkgs "blocky" { };

    settings = mkOption {
      type = format.type;
      default = { };
@@ -30,7 +32,7 @@ in

      serviceConfig = {
        DynamicUser = true;
        ExecStart = "${pkgs.blocky}/bin/blocky --config ${configFile}";
        ExecStart = "${getExe cfg.package} --config ${configFile}";
        Restart = "on-failure";

        AmbientCapabilities = [ "CAP_NET_BIND_SERVICE" ];