diff --git a/modules/homelab/jellyfin.nix b/modules/homelab/jellyfin.nix new file mode 100644 index 00000000..787deee7 --- /dev/null +++ b/modules/homelab/jellyfin.nix @@ -0,0 +1,22 @@ +{ lib, ... }: + +{ + flake.modules.nixos.server-jellyfin = + { config, ... }: + let + cfg = config.homelab.services.jellyfin; + in + with lib; + { + options.homelab.services.jellyfin = { + enable = mkEnableOption "Enable jellyfin"; + }; + + config = mkIf cfg.enable { + services.jellyfin = { + enable = true; + openFirewall = true; + }; + }; + }; +} diff --git a/modules/hosts/homelab/home01/configuration.nix b/modules/hosts/homelab/home01/configuration.nix index c181c41f..3743f053 100644 --- a/modules/hosts/homelab/home01/configuration.nix +++ b/modules/hosts/homelab/home01/configuration.nix @@ -5,8 +5,11 @@ { pkgs, ... }: { imports = with inputs.self.modules.nixos; [ + server-jellyfin ]; + homelab.services.jellyfin.enable = true; + nix.settings = { auto-optimise-store = true;