also refactor nixos modules

This commit is contained in:
Chris Kruining 2026-03-30 09:32:15 +02:00
parent 2471562583
commit b37c5c0cbd
No known key found for this signature in database
GPG key ID: EB894A3560CCCAD2
44 changed files with 10 additions and 2 deletions

View file

@ -0,0 +1,47 @@
{
pkgs,
config,
lib,
inputs,
...
}: let
inherit (builtins) toString;
inherit (lib) mkIf mkEnableOption mkOption types;
cfg = config.sneeuwvlok.services.media.jellyfin;
in {
options.sneeuwvlok.services.media.jellyfin = {
enable = mkEnableOption "Enable jellyfin server";
};
config = mkIf cfg.enable {
sneeuwvlok.services.networking.caddy = {
hosts = {
"jellyfin.kruining.eu" = ''
reverse_proxy http://[::1]:8096
'';
};
};
environment.systemPackages = with pkgs; [
jellyfin
jellyfin-web
jellyfin-ffmpeg
mediainfo
id3v2
yt-dlp
];
services = {
# port is harcoded in nixpkgs module
jellyfin = {
enable = true;
openFirewall = true;
user = "media";
group = "media";
};
};
systemd.services.jellyfin.serviceConfig.killSignal = lib.mkForce "SIGKILL";
};
}