mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-17 15:22:59 +01:00
5ec1fa2060
svn path=/nixos/trunk/; revision=12407
32 lines
893 B
Nix
32 lines
893 B
Nix
{config, pkgs}:
|
|
let
|
|
cfg = config.services.gw6c;
|
|
procps = pkgs.procps;
|
|
gw6cService = import ../services/gw6c {
|
|
inherit (pkgs) stdenv gw6c coreutils
|
|
procps upstart iputils gnused
|
|
gnugrep seccureUser writeScript;
|
|
username = cfg.username;
|
|
password = cfg.password;
|
|
server = cfg.server;
|
|
keepAlive = cfg.keepAlive;
|
|
everPing = cfg.everPing;
|
|
|
|
seccureKeys = config.security.seccureKeys;
|
|
|
|
waitPingableBroker = cfg.waitPingableBroker;
|
|
};
|
|
in
|
|
{
|
|
name = "gw6c";
|
|
users = [];
|
|
groups = [];
|
|
job = "
|
|
description \"Gateway6 client\"
|
|
|
|
start on ${ if cfg.autorun then "network-interfaces/started" else "never" }
|
|
stop on network-interfaces/stop
|
|
|
|
respawn ${gw6cService}/bin/control start
|
|
";
|
|
}
|