diff --git a/devices/nos/modules/jellyfin/default.nix b/devices/nos/modules/jellyfin/default.nix index 78edccd..2624b6a 100644 --- a/devices/nos/modules/jellyfin/default.nix +++ b/devices/nos/modules/jellyfin/default.nix @@ -1,7 +1,9 @@ { config, jellyfin-flake, + jellyfin-ultrachromic-src, lib, + pkgs, ... }: let inherit (lib) hasAttr fileContents optionals; @@ -35,8 +37,50 @@ in { quickConnectAvailable = false; isStartupWizardCompleted = true; - branding.customCss = '' - ''; + branding = let + jellyTheme = pkgs.stdenv.mkDerivation { + name = "Ultrachromic"; + src = jellyfin-ultrachromic-src; + postInstall = "cp -ar $src $out"; + }; + + importFile = file: fileContents "${jellyTheme}/${file}"; + in { + customCss = '' + /* Base theme */ + ${importFile "base.css"} + ${importFile "accentlist.css"} + ${importFile "fixes.css"} + + ${importFile "type/dark_withaccent.css"} + + ${importFile "rounding.css"} + ${importFile "progress/floating.css"} + ${importFile "titlepage/title_banner-logo.css"} + ${importFile "header/header_transparent.css"} + ${importFile "login/login_frame.css"} + ${importFile "fields/fields_border.css"} + ${importFile "cornerindicator/indicator_floating.css"} + + /* Style backdrop */ + .backdropImage {filter: blur(18px) saturate(120%) contrast(120%) brightness(40%);} + + /* Custom Settings */ + :root {--accent: 145,75,245;} + :root {--rounding: 12px;} + + /* https://github.com/CTalvio/Ultrachromic/issues/79 */ + .skinHeader { + color: rgba(var(--accent), 0.8);; + } + .countIndicator, + .fullSyncIndicator, + .mediaSourceIndicator, + .playedIndicator { + background-color: rgba(var(--accent), 0.8); + } + ''; + }; }; libraries.display = { @@ -46,7 +90,16 @@ in { playback.transcoding = { hardwareAccelerationType = "nvenc"; - hardwareDecodingCodecs = ["h264" "hevc" "mpeg2video" "mpeg4" "vc1" "vp8" "vp9" "av1"]; + hardwareDecodingCodecs = [ + "h264" + "hevc" + "mpeg2video" + "mpeg4" + "vc1" + "vp8" + "vp9" + "av1" + ]; enableThrottling = true; enableTonemapping = true; downMixAudioBoost = 1; diff --git a/flake.lock b/flake.lock index 476452a..b95b6a5 100644 --- a/flake.lock +++ b/flake.lock @@ -650,6 +650,22 @@ "type": "github" } }, + "jellyfin-ultrachromic-src": { + "flake": false, + "locked": { + "lastModified": 1688568900, + "narHash": "sha256-DnmvmRTkgmaZVNeOpnqPF6vBouFYGTypRxjyvq0AWI0=", + "owner": "CTalvio", + "repo": "Ultrachromic", + "rev": "b56db9cfdd40c83e563158d50787374708e92c9b", + "type": "github" + }, + "original": { + "owner": "CTalvio", + "repo": "Ultrachromic", + "type": "github" + } + }, "lib-aggregate": { "inputs": { "flake-utils": "flake-utils_3", @@ -1360,6 +1376,7 @@ "hyprland": "hyprland", "hyprlock": "hyprlock", "jellyfin-flake": "jellyfin-flake", + "jellyfin-ultrachromic-src": "jellyfin-ultrachromic-src", "modernx-src": "modernx-src", "nh": "nh", "nix-gaming": "nix-gaming", diff --git a/flake.nix b/flake.nix index 1665ccb..2f50874 100644 --- a/flake.nix +++ b/flake.nix @@ -369,6 +369,13 @@ }; ## Dracula and theme src + jellyfin-ultrachromic-src = { + type = "github"; + owner = "CTalvio"; + repo = "Ultrachromic"; + flake = false; + }; + bat-theme-src = { type = "github"; owner = "matt1432";