nixos/prometheus-wireguard-exporter: use ExecStart instead of script
This commit is contained in:
parent
afd0dc17d6
commit
29d765e250
@ -36,18 +36,17 @@ in {
|
||||
};
|
||||
};
|
||||
serviceOpts = {
|
||||
script = ''
|
||||
${pkgs.prometheus-wireguard-exporter}/bin/prometheus_wireguard_exporter \
|
||||
-p ${toString cfg.port} \
|
||||
${optionalString cfg.verbose "-v"} \
|
||||
${optionalString cfg.singleSubnetPerField "-s"} \
|
||||
${optionalString (cfg.wireguardConfig != null) "-n ${cfg.wireguardConfig}"}
|
||||
'';
|
||||
|
||||
path = [ pkgs.wireguard-tools ];
|
||||
|
||||
serviceConfig = {
|
||||
AmbientCapabilities = [ "CAP_NET_ADMIN" ];
|
||||
ExecStart = ''
|
||||
${pkgs.prometheus-wireguard-exporter}/bin/prometheus_wireguard_exporter \
|
||||
-p ${toString cfg.port} \
|
||||
${optionalString cfg.verbose "-v"} \
|
||||
${optionalString cfg.singleSubnetPerField "-s"} \
|
||||
${optionalString (cfg.wireguardConfig != null) "-n ${cfg.wireguardConfig}"}
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user