mirror of
https://github.com/Stunkymonkey/nixos.git
synced 2025-05-24 09:54:40 +02:00
add jellyfin my-service
This commit is contained in:
parent
94ad1ac0f0
commit
0196e78862
2 changed files with 35 additions and 0 deletions
|
@ -2,6 +2,7 @@
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
./homer
|
./homer
|
||||||
|
./jellyfin
|
||||||
./mumble-server
|
./mumble-server
|
||||||
./rss-bridge
|
./rss-bridge
|
||||||
./ssh-server
|
./ssh-server
|
||||||
|
|
34
modules/services/jellyfin/default.nix
Normal file
34
modules/services/jellyfin/default.nix
Normal file
|
@ -0,0 +1,34 @@
|
||||||
|
# The Free Software Media System
|
||||||
|
{ config, lib, pkgs, ... }:
|
||||||
|
let
|
||||||
|
cfg = config.my.services.jellyfin;
|
||||||
|
domain = config.networking.domain;
|
||||||
|
port = 8096;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options.my.services.jellyfin = with lib; {
|
||||||
|
enable = mkEnableOption "Jellyfin Media Server";
|
||||||
|
};
|
||||||
|
|
||||||
|
config = lib.mkIf cfg.enable {
|
||||||
|
services.jellyfin = {
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
my.services.nginx.virtualHosts = [
|
||||||
|
{
|
||||||
|
subdomain = "jellyfin";
|
||||||
|
inherit port;
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
|
webapps.apps.jellyfin = {
|
||||||
|
dashboard = {
|
||||||
|
name = "Jellyfin";
|
||||||
|
category = "media";
|
||||||
|
icon = "film";
|
||||||
|
link = "https://jellyfin.${domain}";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
Loading…
Add table
Add a link
Reference in a new issue