I FORGOT TO FUCKING FORMAT FUUUUUCK

This commit is contained in:
Snorre Ettrup Altschul 2025-04-03 22:21:25 +02:00
parent 5263873975
commit c94f5ccb72
2 changed files with 124 additions and 117 deletions

View file

@ -1,9 +1,9 @@
{ config
, pkgs
, lib
, ...
}:
let
{
config,
pkgs,
lib,
...
}: let
cfg = config.services.declarative-jellyfin;
toXml' = (import ../../lib {nixpkgs = pkgs;}).toXMLGeneric;
in
@ -61,16 +61,14 @@ with lib; {
};
content = prepass x;
});
in
{
in {
system.activationScripts = {
link-network-xml =
lib.stringAfter ["var"]
(
let
storeFile = pkgs.writeText "network.xml" (toXml "NetworkConfiguration" cfg.network);
in
''
in ''
mkdir -p "/var/lib/jellyfin/config"
cp -s "${storeFile}" "/var/lib/jellyfin/config/network.xml"
''
@ -80,8 +78,7 @@ with lib; {
(
let
storeFile = pkgs.writeText "encoding.xml" (toXml "EncodingOptions" cfg.network);
in
''
in ''
mkdir -p "/var/lib/jellyfin/config"
cp -s "${storeFile}" "/var/lib/jellyfin/config/encoding.xml"
''
@ -91,8 +88,7 @@ with lib; {
(
let
storeFile = pkgs.writeText "system.xml" (toXml "ServerConfiguration" cfg.network);
in
''
in ''
mkdir -p "/var/lib/jellyfin/config"
cp -s "${storeFile}" "/var/lib/jellyfin/config/system.xml"
''

View file

@ -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 = {
ServerName = mkStrOption config.networking.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 {
type = types.int;