diff options
| author | Mel <einebeere@gmail.com> | 2024-11-27 19:56:58 +0100 |
|---|---|---|
| committer | Mel <einebeere@gmail.com> | 2024-11-27 19:57:06 +0100 |
| commit | 6195d26d4d8296aec4e699246cbb859a832cba19 (patch) | |
| tree | 6a6ff7ed72a6f0ee02a90b97c011aeddbc957598 | |
| parent | ecfa32b506bd12458f018d7f890a24d3a1d64b54 (diff) | |
| download | network-6195d26d4d8296aec4e699246cbb859a832cba19.tar.zst network-6195d26d4d8296aec4e699246cbb859a832cba19.zip | |
Move jellyfin to corsac from bismuth
Signed-off-by: Mel <einebeere@gmail.com>
| -rw-r--r-- | machines/corsac/default.nix | 1 | ||||
| -rw-r--r-- | machines/corsac/devices.nix | 12 | ||||
| -rw-r--r-- | modules/jellyfin.nix | 15 | ||||
| -rw-r--r-- | pkgs/default.nix | 5 | ||||
| -rw-r--r-- | pkgs/jellyfin-edited.nix | 15 |
5 files changed, 48 insertions, 0 deletions
diff --git a/machines/corsac/default.nix b/machines/corsac/default.nix index 02430e8..75a9f05 100644 --- a/machines/corsac/default.nix +++ b/machines/corsac/default.nix @@ -9,6 +9,7 @@ ../../modules/dns.nix ../../modules/nfs.nix + ../../modules/jellyfin.nix ]; system.stateVersion = "24.05"; diff --git a/machines/corsac/devices.nix b/machines/corsac/devices.nix index 224029b..396151a 100644 --- a/machines/corsac/devices.nix +++ b/machines/corsac/devices.nix @@ -22,4 +22,16 @@ name = "enp1s0"; DHCP = "yes"; }; + + # extra filesystems + boot.supportedFilesystems = [ "ntfs" ]; + + fileSystems = { + # todo: migrate jellyfin drive + "/run/media/mel/Duo" = { + device = "/dev/disk/by-label/Duo"; + fsType = "ntfs-3g"; + options = [ "rw" "uid=1000" ]; + }; + }; } diff --git a/modules/jellyfin.nix b/modules/jellyfin.nix new file mode 100644 index 0000000..b285161 --- /dev/null +++ b/modules/jellyfin.nix @@ -0,0 +1,15 @@ +{ config, pkgs, auxiliaryPkgs, ... }: + +{ + services.jellyfin = { + enable = true; + openFirewall = true; + package = auxiliaryPkgs.jellyfin; + }; + + environment.systemPackages = (with auxiliaryPkgs; [ + jellyfin + jellyfin-web + pkgs.jellyfin-ffmpeg + ]); +} diff --git a/pkgs/default.nix b/pkgs/default.nix index 07ca87c..7dd2d9b 100644 --- a/pkgs/default.nix +++ b/pkgs/default.nix @@ -4,4 +4,9 @@ common = with pkgs; lib.recurseIntoAttrs (callPackage ./common.nix { }); youcompleteme = pkgs.callPackage ./youcompleteme.nix { }; + + inherit (pkgs.callPackages ./jellyfin-edited.nix { + jellyfin-prev = pkgs.jellyfin; + jellyfin-web-prev = pkgs.jellyfin-web; + }) jellyfin jellyfin-web; } diff --git a/pkgs/jellyfin-edited.nix b/pkgs/jellyfin-edited.nix new file mode 100644 index 0000000..557862e --- /dev/null +++ b/pkgs/jellyfin-edited.nix @@ -0,0 +1,15 @@ +{ jellyfin-prev, jellyfin-web-prev }: + +let + script = "<script src=\"configurationpage?name=skip-intro-button.js\"></script>"; + + jellyfin-web = jellyfin-web-prev.overrideAttrs (attrs: { + postInstall = (attrs.postInstall or "") + '' + sed -i 's:</head>:${script}</head>:g' $out/share/jellyfin-web/index.html + ''; + }); + + jellyfin = jellyfin-prev.override { + inherit jellyfin-web; + }; +in { inherit jellyfin jellyfin-web; } |
