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:
parent
41cf8be412
commit
e85dac137e
4 changed files with 84 additions and 0 deletions
33
nixos/modules/services/misc/sundtek.nix
Normal file
33
nixos/modules/services/misc/sundtek.nix
Normal 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;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue