mirror of
https://codeberg.org/muon/home.git
synced 2025-12-06 08:07:45 +00:00
38 lines
819 B
Nix
38 lines
819 B
Nix
{ pkgs, lib, config, ... }:
|
|
let
|
|
cfg = config.mods.server;
|
|
port = cfg.nginx.ports.photos;
|
|
in with lib; {
|
|
options.mods.server = {
|
|
movies = {
|
|
enable = mkEnableOption {
|
|
default = false;
|
|
description = "enables jellyfin server";
|
|
};
|
|
};
|
|
|
|
photos = {
|
|
enable = mkEnableOption {
|
|
default = false;
|
|
description = "enables immich server";
|
|
};
|
|
};
|
|
};
|
|
|
|
config = {
|
|
services.jellyfin = mkIf cfg.movies.enable {
|
|
enable = true;
|
|
openFirewall = true;
|
|
user = "${config.mods.user.name}";
|
|
};
|
|
|
|
services.immich = mkIf cfg.photos.enable {
|
|
enable = true;
|
|
openFirewall = true;
|
|
host = "0.0.0.0";
|
|
port = port;
|
|
};
|
|
users.users.immich =
|
|
mkIf cfg.photos.enable { extraGroups = [ "video" "render" ]; };
|
|
};
|
|
}
|