Skip to content

Instantly share code, notes, and snippets.

@matthew-piziak
Created April 8, 2020 03:13
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/a1fd0ba833cf0149bbd7f83c23e31864 to your computer and use it in GitHub Desktop.
Save matthew-piziak/a1fd0ba833cf0149bbd7f83c23e31864 to your computer and use it in GitHub Desktop.
{ lib, pkgs, config, ... }:
with lib;
let cfg = config.services.plex-mpv-shim;
in {
options.services.plex-mpv-shim = {
enable = mkEnableOption "plex-mpv-shim service";
# 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" ];
};
config = lib.mkIf cfg.enable {
systemd.user.services.plex-mpv-shim = {
serviceConfig.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