0
0
Fork 0
mirror of https://github.com/NixOS/nixpkgs.git synced 2025-07-13 13:40:28 +03:00

sundtek init at 30-06-2015

This commit is contained in:
Simon Vandel Sillesen 2015-07-02 03:18:56 +02:00
parent 41cf8be412
commit e85dac137e
4 changed files with 84 additions and 0 deletions

View file

@ -0,0 +1,33 @@
{ 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=5 --wait-for-devices
'';
ExecStop = "${pkgs.sundtek}/bin/mediaclient --shutdown";
RemainAfterExit = true;
};
};
};
}