feat(services): add whisparr service configuration

This commit is contained in:
Giulio De Pasquale 2025-08-05 14:01:35 +01:00
parent 3a04a7abfd
commit a1f92323dd
4 changed files with 47 additions and 6 deletions

View File

@ -197,11 +197,11 @@ in
backendDomain = "ollama.giugl.io";
acceleration = "cuda";
frontend = {
enable = true;
domain = "pino.giugl.io";
package = pkgs.unstablePkgs.open-webui;
};
# frontend = {
# enable = true;
# domain = "pino.giugl.io";
# package = pkgs.unstablePkgs.open-webui;
# };
};
homeassistant = {
@ -235,6 +235,12 @@ in
enable = true;
domain = "lang.giugl.io";
};
whisparr = {
enable = true;
domain = "whisparr.giugl.io";
};
};
};
}

View File

@ -17,5 +17,6 @@
./sonarr
./headscale
./languagetool
./whisparr
];
}

View File

@ -39,7 +39,7 @@ in
allowOrigin = cfg.domain;
settings = {
languageModel = "${ngramDataDir}/share/languagetool/ngrams/";
fasttextModel = "${pkgs.langtoolPkgs.fasttext}/share/languagetool/fasttextmodel/lid.176.bin";
fasttextModel = "${pkgs.langtoolPkgs.fasttextmodel}/share/languagetool/fasttextmodel/lid.176.bin";
fasttextBinary = "${cfg.fasttextPackage}/bin/fasttext";
};
};

View File

@ -0,0 +1,34 @@
{ config, lib, pkgs, ... }:
let
inherit (lib) mkIf;
cfg = config.pepe.services.whisparr;
in
{
options.pepe.services.whisparr = with lib; {
enable = mkEnableOption "Enable whisparr";
package = mkPackageOption pkgs "whisparr" { };
domain = mkOption {
type = types.str;
default = null;
};
};
config = mkIf cfg.enable {
services.whisparr = {
enable = true;
package = cfg.package;
};
pepe.core.vhost.hosts.${cfg.domain} = {
locations."/" = {
port = config.services.whisparr.settings.server.port;
allowLAN = true;
allowVPN = true;
};
};
pepe.core.media.groupMembers = mkIf config.pepe.core.media.enable [ config.services.whisparr.group ];
};
}