1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-28 08:31:59 +00:00
nixpkgs/nixos/modules/services/misc/sundtek.nix
Simon Vandel Sillesen 81e99998f7 sundtek: 2015-12-12 -> 2016-01-26 + service change
* There is no need for hydra to build this, hence preferLocal
* service change: do not hardcode a wait time of 5 seconds
2016-01-30 20:08:52 +01:00

34 lines
709 B
Nix

{ config, lib, pkgs, ... }:
with lib;
let
cfg = config.services.sundtek;
in
{
options.services.sundtek = {
enable = mkEnableOption "Sundtek driver";
};
config = mkIf cfg.enable {
environment.systemPackages = [ pkgs.sundtek ];
systemd.services.sundtek = {
description = "Sundtek driver";
wantedBy = [ "multi-user.target" ];
serviceConfig = {
Type = "oneshot";
ExecStart = ''
${pkgs.sundtek}/bin/mediasrv -d -v -p ${pkgs.sundtek}/bin ;\
${pkgs.sundtek}/bin/mediaclient --start --wait-for-devices
'';
ExecStop = "${pkgs.sundtek}/bin/mediaclient --shutdown";
RemainAfterExit = true;
};
};
};
}