diff options
author | Matthew Justin Bauer <mjbauer95@gmail.com> | 2018-06-20 21:45:36 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-06-20 21:45:36 -0400 |
commit | 39250775485ad425dc10177c74db88b232f2160b (patch) | |
tree | eacdb258d9b252766eff3f648b871ab6d929f94d /nixos | |
parent | b77a57b78b62a8111bd76560a45c33a5cb6c1d01 (diff) | |
parent | 358296c05a790777e11938f3eb97febcb8da0685 (diff) | |
download | nixpkgs-39250775485ad425dc10177c74db88b232f2160b.tar nixpkgs-39250775485ad425dc10177c74db88b232f2160b.tar.gz nixpkgs-39250775485ad425dc10177c74db88b232f2160b.tar.bz2 nixpkgs-39250775485ad425dc10177c74db88b232f2160b.tar.lz nixpkgs-39250775485ad425dc10177c74db88b232f2160b.tar.xz nixpkgs-39250775485ad425dc10177c74db88b232f2160b.tar.zst nixpkgs-39250775485ad425dc10177c74db88b232f2160b.zip |
Merge pull request #41485 from teto/owamp
[RDY] Owamp : Get one way (network) latencies between synchronized computers
Diffstat (limited to 'nixos')
-rw-r--r-- | nixos/modules/module-list.nix | 1 | ||||
-rw-r--r-- | nixos/modules/services/networking/owamp.nix | 47 |
2 files changed, 48 insertions, 0 deletions
diff --git a/nixos/modules/module-list.nix b/nixos/modules/module-list.nix index cd594b934b8..193ef0d1c96 100644 --- a/nixos/modules/module-list.nix +++ b/nixos/modules/module-list.nix @@ -541,6 +541,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 diff --git a/nixos/modules/services/networking/owamp.nix b/nixos/modules/services/networking/owamp.nix new file mode 100644 index 00000000000..a0d3e70d8e5 --- /dev/null +++ b/nixos/modules/services/networking/owamp.nix @@ -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"; + }; + }; + }; +} |