Formatted
This commit is contained in:
@@ -1,14 +1,15 @@
|
||||
{ config, pkgs, lib, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
cfg = config.util-nixarr.services.bazarr;
|
||||
in
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
cfg = config.util-nixarr.services.bazarr;
|
||||
in {
|
||||
options = {
|
||||
util-nixarr.services.bazarr = {
|
||||
enable = mkEnableOption ("bazarr, a subtitle manager for Sonarr and Radarr");
|
||||
enable = mkEnableOption "bazarr, a subtitle manager for Sonarr and Radarr";
|
||||
|
||||
openFirewall = mkOption {
|
||||
type = types.bool;
|
||||
@@ -49,8 +50,8 @@ in
|
||||
|
||||
systemd.services.bazarr = {
|
||||
description = "bazarr";
|
||||
after = [ "network.target" ];
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
after = ["network.target"];
|
||||
wantedBy = ["multi-user.target"];
|
||||
|
||||
serviceConfig = {
|
||||
Type = "simple";
|
||||
@@ -68,7 +69,7 @@ in
|
||||
};
|
||||
|
||||
networking.firewall = mkIf cfg.openFirewall {
|
||||
allowedTCPPorts = [ cfg.listenPort ];
|
||||
allowedTCPPorts = [cfg.listenPort];
|
||||
};
|
||||
|
||||
users.users = mkIf (cfg.user == "bazarr") {
|
||||
|
||||
@@ -10,7 +10,7 @@ in {
|
||||
imports = [
|
||||
./bazarr-module
|
||||
];
|
||||
|
||||
|
||||
options.nixarr.bazarr = {
|
||||
enable = mkEnableOption "the bazarr service.";
|
||||
|
||||
@@ -24,7 +24,7 @@ in {
|
||||
|
||||
**Warning:** Setting this to any path, where the subpath is not
|
||||
owned by root, will fail! For example:
|
||||
|
||||
|
||||
```nix
|
||||
stateDir = /home/user/nixarr/.state/bazarr
|
||||
```
|
||||
@@ -81,7 +81,12 @@ in {
|
||||
# Port mappings
|
||||
# TODO: openports
|
||||
vpnnamespaces.wg = mkIf cfg.vpn.enable {
|
||||
portMappings = [{ from = config.bazarr.listenPort; to = config.bazarr.listenPort; }];
|
||||
portMappings = [
|
||||
{
|
||||
from = config.bazarr.listenPort;
|
||||
to = config.bazarr.listenPort;
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
services.nginx = mkIf cfg.vpn.enable {
|
||||
|
||||
Reference in New Issue
Block a user