I FORGOT TO FUCKING FORMAT FUUUUUCK
This commit is contained in:
parent
5263873975
commit
c94f5ccb72
|
@ -1,9 +1,9 @@
|
||||||
{ config
|
{
|
||||||
, pkgs
|
config,
|
||||||
, lib
|
pkgs,
|
||||||
, ...
|
lib,
|
||||||
}:
|
...
|
||||||
let
|
}: let
|
||||||
cfg = config.services.declarative-jellyfin;
|
cfg = config.services.declarative-jellyfin;
|
||||||
toXml' = (import ../../lib {nixpkgs = pkgs;}).toXMLGeneric;
|
toXml' = (import ../../lib {nixpkgs = pkgs;}).toXMLGeneric;
|
||||||
in
|
in
|
||||||
|
@ -61,16 +61,14 @@ with lib; {
|
||||||
};
|
};
|
||||||
content = prepass x;
|
content = prepass x;
|
||||||
});
|
});
|
||||||
in
|
in {
|
||||||
{
|
|
||||||
system.activationScripts = {
|
system.activationScripts = {
|
||||||
link-network-xml =
|
link-network-xml =
|
||||||
lib.stringAfter ["var"]
|
lib.stringAfter ["var"]
|
||||||
(
|
(
|
||||||
let
|
let
|
||||||
storeFile = pkgs.writeText "network.xml" (toXml "NetworkConfiguration" cfg.network);
|
storeFile = pkgs.writeText "network.xml" (toXml "NetworkConfiguration" cfg.network);
|
||||||
in
|
in ''
|
||||||
''
|
|
||||||
mkdir -p "/var/lib/jellyfin/config"
|
mkdir -p "/var/lib/jellyfin/config"
|
||||||
cp -s "${storeFile}" "/var/lib/jellyfin/config/network.xml"
|
cp -s "${storeFile}" "/var/lib/jellyfin/config/network.xml"
|
||||||
''
|
''
|
||||||
|
@ -80,8 +78,7 @@ with lib; {
|
||||||
(
|
(
|
||||||
let
|
let
|
||||||
storeFile = pkgs.writeText "encoding.xml" (toXml "EncodingOptions" cfg.network);
|
storeFile = pkgs.writeText "encoding.xml" (toXml "EncodingOptions" cfg.network);
|
||||||
in
|
in ''
|
||||||
''
|
|
||||||
mkdir -p "/var/lib/jellyfin/config"
|
mkdir -p "/var/lib/jellyfin/config"
|
||||||
cp -s "${storeFile}" "/var/lib/jellyfin/config/encoding.xml"
|
cp -s "${storeFile}" "/var/lib/jellyfin/config/encoding.xml"
|
||||||
''
|
''
|
||||||
|
@ -91,8 +88,7 @@ with lib; {
|
||||||
(
|
(
|
||||||
let
|
let
|
||||||
storeFile = pkgs.writeText "system.xml" (toXml "ServerConfiguration" cfg.network);
|
storeFile = pkgs.writeText "system.xml" (toXml "ServerConfiguration" cfg.network);
|
||||||
in
|
in ''
|
||||||
''
|
|
||||||
mkdir -p "/var/lib/jellyfin/config"
|
mkdir -p "/var/lib/jellyfin/config"
|
||||||
cp -s "${storeFile}" "/var/lib/jellyfin/config/system.xml"
|
cp -s "${storeFile}" "/var/lib/jellyfin/config/system.xml"
|
||||||
''
|
''
|
||||||
|
|
|
@ -1,9 +1,14 @@
|
||||||
{ lib, config, ... }:
|
|
||||||
with lib;
|
|
||||||
let
|
|
||||||
mkStrOption = default: description: { type = types.str; inherit default description; };
|
|
||||||
in
|
|
||||||
{
|
{
|
||||||
|
lib,
|
||||||
|
config,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
with lib; let
|
||||||
|
mkStrOption = default: description: {
|
||||||
|
type = types.str;
|
||||||
|
inherit default description;
|
||||||
|
};
|
||||||
|
in {
|
||||||
options.services.declarative-jellyfin.system = {
|
options.services.declarative-jellyfin.system = {
|
||||||
ServerName = mkStrOption config.networking.hostName ''
|
ServerName = mkStrOption config.networking.hostName ''
|
||||||
This name will be used to identify the server and will default to the server's hostname.
|
This name will be used to identify the server and will default to the server's hostname.
|
||||||
|
@ -368,9 +373,15 @@ in
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
RemoveOldPlugins = mkOption { type = types.bool; default = true; };
|
RemoveOldPlugins = mkOption {
|
||||||
|
type = types.bool;
|
||||||
|
default = true;
|
||||||
|
};
|
||||||
|
|
||||||
AllowClientLogUpload = mkOption { type = types.bool; default = true; };
|
AllowClientLogUpload = mkOption {
|
||||||
|
type = types.bool;
|
||||||
|
default = true;
|
||||||
|
};
|
||||||
|
|
||||||
DummyChapterDuration = mkOption {
|
DummyChapterDuration = mkOption {
|
||||||
type = types.int;
|
type = types.int;
|
||||||
|
|
Loading…
Reference in a new issue