Skip to content

Instantly share code, notes, and snippets.

@matthew-piziak
Created April 8, 2020 04:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save matthew-piziak/d8593152e41ac7e5efaf6bfd9e815742 to your computer and use it in GitHub Desktop.
Save matthew-piziak/d8593152e41ac7e5efaf6bfd9e815742 to your computer and use it in GitHub Desktop.
{ pkgs, config, lib, ... }:
let cfg = config.services.plex-mpv-shim;
in with lib; {
options.services.plex-mpv-shim = { enable = mkEnableOption "plex-mpv-shim service"; };
config = mkIf cfg.enable {
systemd.services.plex-mpv-shim = {
# https://github.com/NixOS/nixpkgs/blob/master/nixos/modules/system/boot/systemd-unit-options.nix#L63
# https://github.com/markuskowa/NixOS-QChem/blob/ca5f6ab24d3011e868b38b8023c5ae51679a6202/template_module.nix
wantedBy = [ "multi-user.target" ];
description = "HTTP server connecting Plex to MPV client";
serviceConfig = {
User = "matt";
ExecStart = "${pkgs.unstable.plex-mpv-shim}/bin/plex-mpv-shim";
};
};
};
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment