nixos/epgstation: add a new option 'ffmpeg'

Closes #187120.
This commit is contained in:
midchildan 2022-08-17 18:50:46 +09:00
parent 059006b84b
commit 94eb60a7d2
No known key found for this signature in database
GPG key ID: A64DE57FA5963935

View file

@ -80,11 +80,11 @@ in
options.services.epgstation = {
enable = lib.mkEnableOption (lib.mdDoc description);
package = lib.mkOption {
default = pkgs.epgstation;
type = lib.types.package;
defaultText = lib.literalExpression "pkgs.epgstation";
description = lib.mdDoc "epgstation package to use";
package = lib.mkPackageOptionMD pkgs "epgstation" { };
ffmpeg = lib.mkPackageOptionMD pkgs "ffmpeg" {
default = [ "ffmpeg-headless" ];
example = "pkgs.ffmpeg-full";
};
usePreconfiguredStreaming = lib.mkOption {
@ -278,6 +278,8 @@ in
package = lib.mkDefault pkgs.mariadb;
ensureDatabases = [ cfg.database.name ];
# FIXME: enable once mysqljs supports auth_socket
# https://github.com/mysqljs/mysql/issues/1507
#
# ensureUsers = [ {
# name = username;
# ensurePermissions = { "${cfg.database.name}.*" = "ALL PRIVILEGES"; };
@ -295,8 +297,8 @@ in
database = cfg.database.name;
};
ffmpeg = lib.mkDefault "${pkgs.ffmpeg-full}/bin/ffmpeg";
ffprobe = lib.mkDefault "${pkgs.ffmpeg-full}/bin/ffprobe";
ffmpeg = lib.mkDefault "${cfg.ffmpeg}/bin/ffmpeg";
ffprobe = lib.mkDefault "${cfg.ffmpeg}/bin/ffprobe";
# for disambiguation with TypeScript files
recordedFileExtension = lib.mkDefault ".m2ts";