mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-04-17 02:28:34 +00:00
Merge pull request #324320 from tomaskala/add-package-option-to-blocky
nixos/blocky: Add an option for the package to be used
This commit is contained in:
commit
1af787b0e7
@ -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" ];
|
||||
|
Loading…
Reference in New Issue
Block a user