mirror of
https://github.com/Stunkymonkey/nixos.git
synced 2025-05-24 18:04:41 +02:00
48 lines
1,005 B
Nix
48 lines
1,005 B
Nix
# manages indexes
|
|
{ config, lib, pkgs, ... }:
|
|
let
|
|
cfg = config.my.services.prowlarr;
|
|
domain = config.networking.domain;
|
|
port = 9696;
|
|
in
|
|
{
|
|
options.my.services.prowlarr = with lib; {
|
|
enable = mkEnableOption "Prowlarr for indexing";
|
|
};
|
|
|
|
config = lib.mkIf cfg.enable {
|
|
services.prowlarr = {
|
|
enable = true;
|
|
};
|
|
# # ugly fix for service not having a homedirectory
|
|
# users.users.prowlarr = {
|
|
# isSystemUser = true;
|
|
# home = "/var/lib/prowlarr";
|
|
# group = "prowlarr";
|
|
# uid = 61654;
|
|
# };
|
|
# users.groups.prowlarr = {
|
|
# gid = 61654;
|
|
# };
|
|
|
|
systemd.services.prowlarr = {
|
|
after = [ "network-online.target" ];
|
|
};
|
|
|
|
my.services.nginx.virtualHosts = [
|
|
{
|
|
subdomain = "indexer";
|
|
inherit port;
|
|
}
|
|
];
|
|
|
|
webapps.apps.prowlarr = {
|
|
dashboard = {
|
|
name = "Indexer";
|
|
category = "app";
|
|
icon = "sync-alt";
|
|
link = "https://indexer.${domain}";
|
|
};
|
|
};
|
|
};
|
|
}
|