-
-
Save matthew-piziak/a1fd0ba833cf0149bbd7f83c23e31864 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
{ 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