Added package options to all modules

This commit is contained in:
rasmus-kirk
2024-09-19 22:49:35 +02:00
parent 0ef85b5345
commit c93ecf892e
18 changed files with 150 additions and 117 deletions
+2
View File
@@ -11,6 +11,8 @@ in {
util-nixarr.services.bazarr = {
enable = mkEnableOption "bazarr, a subtitle manager for Sonarr and Radarr";
package = mkPackageOption pkgs "bazarr" { };
openFirewall = mkOption {
type = types.bool;
default = false;
+7 -3
View File
@@ -1,6 +1,7 @@
{
config,
lib,
pkgs,
...
}:
with lib; let
@@ -23,6 +24,8 @@ in {
'';
};
package = mkPackageOption pkgs "bazarr" { };
stateDir = mkOption {
type = types.path;
default = "${nixarr.stateDir}/bazarr";
@@ -82,6 +85,7 @@ in {
util-nixarr.services.bazarr = {
enable = cfg.enable;
package = cfg.package;
user = "bazarr";
group = "media";
openFirewall = cfg.openFirewall;
@@ -89,14 +93,14 @@ in {
};
# Enable and specify VPN namespace to confine service in.
systemd.services.bazarr.vpnconfinement = mkIf cfg.vpn.enable {
systemd.services.bazarr.vpnConfinement = mkIf cfg.vpn.enable {
enable = true;
vpnnamespace = "wg";
vpnNamespace = "wg";
};
# Port mappings
# TODO: openports
vpnnamespaces.wg = mkIf cfg.vpn.enable {
vpnNamespaces.wg = mkIf cfg.vpn.enable {
portMappings = [
{
from = config.bazarr.listenPort;