mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-03-21 11:33:24 +00:00
owamp: adding module
You can retrieve the one way latency between your client and the remote host via owping.
This commit is contained in:
parent
8981cb7b68
commit
358296c05a
nixos/modules
|
@ -536,6 +536,7 @@
|
|||
./services/networking/openntpd.nix
|
||||
./services/networking/openvpn.nix
|
||||
./services/networking/ostinato.nix
|
||||
./services/networking/owamp.nix
|
||||
./services/networking/pdnsd.nix
|
||||
./services/networking/polipo.nix
|
||||
./services/networking/powerdns.nix
|
||||
|
|
47
nixos/modules/services/networking/owamp.nix
Normal file
47
nixos/modules/services/networking/owamp.nix
Normal file
|
@ -0,0 +1,47 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
cfg = config.services.owamp;
|
||||
in
|
||||
{
|
||||
|
||||
###### interface
|
||||
|
||||
options = {
|
||||
services.owamp.enable = mkEnableOption ''Enable OWAMP server'';
|
||||
};
|
||||
|
||||
|
||||
###### implementation
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
users.extraUsers = singleton {
|
||||
name = "owamp";
|
||||
group = "owamp";
|
||||
description = "Owamp daemon";
|
||||
};
|
||||
|
||||
users.extraGroups = singleton {
|
||||
name = "owamp";
|
||||
};
|
||||
|
||||
systemd.services.owamp = {
|
||||
description = "Owamp server";
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
|
||||
serviceConfig = {
|
||||
ExecStart="${pkgs.owamp}/bin/owampd -R /run/owamp -d /run/owamp -v -Z ";
|
||||
PrivateTmp = true;
|
||||
Restart = "always";
|
||||
Type="simple";
|
||||
User = "owamp";
|
||||
Group = "owamp";
|
||||
RuntimeDirectory = "owamp";
|
||||
StateDirectory = "owamp";
|
||||
AmbientCapabilities = "cap_net_bind_service";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue