Formatted

This commit is contained in:
rasmus-kirk
2024-03-12 23:42:48 +01:00
parent 54cfc9f73b
commit 712dc3728e
18 changed files with 503 additions and 540 deletions
+12 -11
View File
@@ -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") {
+8 -3
View File
@@ -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 {