nixpkgs/nixos/modules/services/misc/sundtek.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

34 lines
721 B
Nix
Raw Normal View History

2015-07-02 01:18:56 +00:00
{ config, lib, pkgs, ... }:
with lib;
let
cfg = config.services.sundtek;
in
{
options.services.sundtek = {
enable = mkEnableOption (lib.mdDoc "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
2015-07-02 01:18:56 +00:00
'';
ExecStop = "${pkgs.sundtek}/bin/mediaclient --shutdown";
RemainAfterExit = true;
};
};
};
}