-
-
Save matthew-piziak/d8593152e41ac7e5efaf6bfd9e815742 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ 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