Skip to content

Commit

Permalink
chore: add jellyfin
Browse files Browse the repository at this point in the history
  • Loading branch information
dominicegginton committed Jan 17, 2025
1 parent 57bf309 commit 997466b
Show file tree
Hide file tree
Showing 5 changed files with 57 additions and 1 deletion.
4 changes: 4 additions & 0 deletions hosts/nixos/ghost-gs60/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -76,5 +76,9 @@
services.immich.enable = true;
services.unifi.enable = true;
services.home-assistant.enable = true;
services.jellyfin.enable = true;
services.jellyfin.dataDir = "/mnt/data/media/";
services.deluge.enable = true;
services.deluge.dataDir = "/mnt/data/media/";
};
}
2 changes: 2 additions & 0 deletions modules/nixos/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"${modulesPath}/profiles/qemu-guest.nix"
./bluetooth.nix
./console.nix
./deluge.nix
./display.nix
./distributed-builds.nix
./documentation.nix
Expand All @@ -16,6 +17,7 @@
./homepage-dashboard.nix
./i18n.nix
./immich.nix
./jellyfin.nix
./monitoring.nix
./networking.nix
./nix-settings.nix
Expand Down
26 changes: 26 additions & 0 deletions modules/nixos/deluge.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{ config, lib, ... }:

let
cfg = config.modules.services.deluge;
in

with lib;

{
options.modules.services.deluge = {
enable = mkEnableOption "deluge";
dataDir = mkOption { type = types.path; };
};

config = mkIf cfg.enable {
services.deluge = {
enable = true;
openFirewall = true;
dataDir = cfg.dataDir;
web.enable = true;
web.openFirewall = true;
declarative = true;
authFile = "/run/secrets/deulge";
};
};
}
4 changes: 3 additions & 1 deletion modules/nixos/homepage-dashboard.nix
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,10 @@ with lib;
}
{
Burbage = [
{ "Home Assistant" = [{ abbr = "HA"; href = "http://ghost-gs60:8443/"; }]; }
{ "Home Assistant" = [{ abbr = "HA"; href = "http://ghost-gs60:8123/"; }]; }
{ Unifi = [{ abbr = "UTF"; href = "https://ghost-gs60:8443/"; }]; }
{ Jellyfin = [{ abbr = "JF"; href = "http://ghost:8096/"; }]; }
{ Deluge = [{ abbr = "DE"; href = "http://ghost-gs60:8112/"; }]; }
];
}
{
Expand Down
22 changes: 22 additions & 0 deletions modules/nixos/jellyfin.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{ config, lib, ... }:

let
cfg = config.modules.services.jellyfin;
in

with lib;

{
options.modules.services.jellyfin = {
enable = mkEnableOption "jellyfin";
dataDir = mkOption { type = types.str; };
};

config = mkIf cfg.enable {
services.jellyfin = {
enable = true;
openFirewall = true;
dataDir = cfg.dataDir;
};
};
}

0 comments on commit 997466b

Please sign in to comment.