mirror of
https://github.com/nix-community/home-manager.git
synced 2025-12-09 10:31:06 +01:00
parent
6695b1d477
commit
82ee14ff60
124 changed files with 1848 additions and 1891 deletions
|
|
@ -4,9 +4,6 @@
|
|||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
|
||||
jsonFormat = pkgs.formats.json { };
|
||||
|
|
@ -14,23 +11,23 @@ let
|
|||
|
||||
in
|
||||
{
|
||||
meta.maintainers = [ maintainers.starcraft66 ];
|
||||
meta.maintainers = [ lib.maintainers.starcraft66 ];
|
||||
|
||||
options = {
|
||||
services.plex-mpv-shim = {
|
||||
enable = mkEnableOption "Plex mpv shim";
|
||||
enable = lib.mkEnableOption "Plex mpv shim";
|
||||
|
||||
package = mkOption {
|
||||
type = types.package;
|
||||
package = lib.mkOption {
|
||||
type = lib.types.package;
|
||||
default = pkgs.plex-mpv-shim;
|
||||
defaultText = literalExpression "pkgs.plex-mpv-shim";
|
||||
defaultText = lib.literalExpression "pkgs.plex-mpv-shim";
|
||||
description = "The package to use for the Plex mpv shim.";
|
||||
};
|
||||
|
||||
settings = mkOption {
|
||||
settings = lib.mkOption {
|
||||
type = jsonFormat.type;
|
||||
default = { };
|
||||
example = literalExpression ''
|
||||
example = lib.literalExpression ''
|
||||
{
|
||||
adaptive_transcode = false;
|
||||
allow_http = false;
|
||||
|
|
@ -51,12 +48,12 @@ in
|
|||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
config = lib.mkIf cfg.enable {
|
||||
assertions = [
|
||||
(lib.hm.assertions.assertPlatform "services.plex-mpv-shim" pkgs lib.platforms.linux)
|
||||
];
|
||||
|
||||
xdg.configFile."plex-mpv-shim/conf.json" = mkIf (cfg.settings != { }) {
|
||||
xdg.configFile."plex-mpv-shim/conf.json" = lib.mkIf (cfg.settings != { }) {
|
||||
source = jsonFormat.generate "conf.json" cfg.settings;
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue