Updated docs and removed some superflous statedirs from systemd-tmpfiles
This commit is contained in:
@@ -107,12 +107,13 @@ This example does the following:
|
||||
enable = true;
|
||||
# These two values are also the default, but you can set them to whatever
|
||||
# else you want
|
||||
# WARNING: Do _not_ set them to `/home/user/whatever`, it will not work!
|
||||
mediaDir = "/data/media";
|
||||
stateDir = "/data/media/.state/nixarr";
|
||||
|
||||
vpn = {
|
||||
enable = true;
|
||||
# IMPORTANT: This file must _not_ be in the config git directory
|
||||
# WARNING: This file must _not_ be in the config git directory
|
||||
# You can usually get this wireguard file from your VPN provider
|
||||
wgConf = "/data/.secret/wg.conf";
|
||||
};
|
||||
@@ -136,6 +137,7 @@ This example does the following:
|
||||
|
||||
# It is possible for this module to run the *Arrs through a VPN, but it
|
||||
# is generally not recommended, as it can cause rate-limiting issues.
|
||||
bazarr.enable = true;
|
||||
sonarr.enable = true;
|
||||
radarr.enable = true;
|
||||
prowlarr.enable = true;
|
||||
|
||||
@@ -18,8 +18,19 @@ in {
|
||||
type = types.path;
|
||||
default = "${nixarr.stateDir}/bazarr";
|
||||
defaultText = literalExpression ''"''${nixarr.stateDir}/bazarr"'';
|
||||
example = "/home/user/.local/share/nixarr/bazarr";
|
||||
description = "The state directory for bazarr";
|
||||
example = "/nixarr/.state/bazarr";
|
||||
description = ''
|
||||
The location of the state directory for the Bazarr service.
|
||||
|
||||
**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
|
||||
```
|
||||
|
||||
Is not supported, because `/home/user` is owned by `user`.
|
||||
'';
|
||||
};
|
||||
|
||||
openFirewall = mkOption {
|
||||
|
||||
@@ -14,9 +14,20 @@ in with lib; {
|
||||
stateDir = mkOption {
|
||||
type = types.path;
|
||||
default = "${nixarr.stateDir}/jellyfin";
|
||||
defaultText = literalExpression ''!cfg.vpn.enable'';
|
||||
example = "/home/user/.local/share/nixarr/jellyfin";
|
||||
description = "The state directory for Jellyfin.";
|
||||
defaultText = literalExpression ''"''${nixarr.stateDir}/jellyfin"'';
|
||||
example = "/nixarr/.state/jellyfin";
|
||||
description = ''
|
||||
The location of the state directory for the Jellyfin service.
|
||||
|
||||
**Warning:** Setting this to any path, where the subpath is not
|
||||
owned by root, will fail! For example:
|
||||
|
||||
```nix
|
||||
stateDir = /home/user/nixarr/.state/jellyfin
|
||||
```
|
||||
|
||||
Is not supported, because `/home/user` is owned by `user`.
|
||||
'';
|
||||
};
|
||||
|
||||
openFirewall = mkOption {
|
||||
@@ -170,10 +181,6 @@ in with lib; {
|
||||
|
||||
systemd.tmpfiles.rules = [
|
||||
"d '${cfg.stateDir}' 0700 streamer root - -"
|
||||
"d '${cfg.stateDir}/log' 0700 streamer root - -"
|
||||
"d '${cfg.stateDir}/cache' 0700 streamer root - -"
|
||||
"d '${cfg.stateDir}/data' 0700 streamer root - -"
|
||||
"d '${cfg.stateDir}/config' 0700 streamer root - -"
|
||||
];
|
||||
|
||||
services.jellyfin = {
|
||||
|
||||
@@ -14,9 +14,20 @@ in {
|
||||
stateDir = mkOption {
|
||||
type = types.path;
|
||||
default = "${nixarr.stateDir}/lidarr";
|
||||
defaultText = literalExpression ''!cfg.vpn.enable'';
|
||||
example = "/home/user/.local/share/nixarr/lidarr";
|
||||
description = "The state directory for Lidarr";
|
||||
defaultText = literalExpression ''"''${nixarr.stateDir}/lidarr"'';
|
||||
example = "/nixarr/.state/lidarr";
|
||||
description = ''
|
||||
The location of the state directory for the Lidarr service.
|
||||
|
||||
**Warning:** Setting this to any path, where the subpath is not
|
||||
owned by root, will fail! For example:
|
||||
|
||||
```nix
|
||||
stateDir = /home/user/nixarr/.state/lidarr
|
||||
```
|
||||
|
||||
Is not supported, because `/home/user` is owned by `user`.
|
||||
'';
|
||||
};
|
||||
|
||||
openFirewall = mkOption {
|
||||
@@ -50,10 +61,6 @@ in {
|
||||
}
|
||||
];
|
||||
|
||||
systemd.tmpfiles.rules = [
|
||||
"d '${cfg.stateDir}' 0700 lidarr root - -"
|
||||
];
|
||||
|
||||
services.lidarr = {
|
||||
enable = cfg.enable;
|
||||
user = "lidarr";
|
||||
|
||||
+20
-2
@@ -78,18 +78,36 @@ in {
|
||||
mediaDir = mkOption {
|
||||
type = types.path;
|
||||
default = "/data/media";
|
||||
example = "/home/user/nixarr";
|
||||
example = "/nixarr";
|
||||
description = ''
|
||||
The location of the media directory for the services.
|
||||
|
||||
**Warning:** Setting this to any path, where the subpath is not
|
||||
owned by root, will fail! For example:
|
||||
|
||||
```nix
|
||||
mediaDir = /home/user/nixarr
|
||||
```
|
||||
|
||||
Is not supported, because `/home/user` is owned by `user`.
|
||||
'';
|
||||
};
|
||||
|
||||
stateDir = mkOption {
|
||||
type = types.path;
|
||||
default = "/data/.state/nixarr";
|
||||
example = "/home/user/.local/share/nixarr";
|
||||
example = "/nixarr/.state";
|
||||
description = ''
|
||||
The location of the state directory for the services.
|
||||
|
||||
**Warning:** Setting this to any path, where the subpath is not
|
||||
owned by root, will fail! For example:
|
||||
|
||||
```nix
|
||||
stateDir = /home/user/nixarr/.state
|
||||
```
|
||||
|
||||
Is not supported, because `/home/user` is owned by `user`.
|
||||
'';
|
||||
};
|
||||
|
||||
|
||||
@@ -19,9 +19,20 @@ in {
|
||||
stateDir = mkOption {
|
||||
type = types.path;
|
||||
default = "${nixarr.stateDir}/prowlarr";
|
||||
defaultText = literalExpression ''!cfg.vpn.enable'';
|
||||
example = "/home/user/.local/share/nixarr/prowlarr";
|
||||
description = "The state directory for Prowlarr.";
|
||||
defaultText = literalExpression ''"''${nixarr.stateDir}/prowlarr"'';
|
||||
example = "/nixarr/.state/prowlarr";
|
||||
description = ''
|
||||
The location of the state directory for the Prowlarr service.
|
||||
|
||||
**Warning:** Setting this to any path, where the subpath is not
|
||||
owned by root, will fail! For example:
|
||||
|
||||
```nix
|
||||
stateDir = /home/user/nixarr/.state/prowlarr
|
||||
```
|
||||
|
||||
Is not supported, because `/home/user` is owned by `user`.
|
||||
'';
|
||||
};
|
||||
|
||||
openFirewall = mkOption {
|
||||
@@ -55,10 +66,6 @@ in {
|
||||
}
|
||||
];
|
||||
|
||||
systemd.tmpfiles.rules = [
|
||||
"d '${cfg.stateDir}' 0700 prowlarr root - -"
|
||||
];
|
||||
|
||||
util-nixarr.services.prowlarr = {
|
||||
enable = true;
|
||||
openFirewall = cfg.openFirewall;
|
||||
|
||||
@@ -15,9 +15,20 @@ in {
|
||||
stateDir = mkOption {
|
||||
type = types.path;
|
||||
default = "${nixarr.stateDir}/radarr";
|
||||
defaultText = literalExpression ''!cfg.vpn.enable'';
|
||||
example = "/home/user/.local/share/nixarr/radarr";
|
||||
description = "The state directory for radarr.";
|
||||
defaultText = literalExpression ''"''${nixarr.stateDir}/radarr"'';
|
||||
example = "/nixarr/.state/radarr";
|
||||
description = ''
|
||||
The location of the state directory for the Radarr service.
|
||||
|
||||
**Warning:** Setting this to any path, where the subpath is not
|
||||
owned by root, will fail! For example:
|
||||
|
||||
```nix
|
||||
stateDir = /home/user/nixarr/.state/radarr
|
||||
```
|
||||
|
||||
Is not supported, because `/home/user` is owned by `user`.
|
||||
'';
|
||||
};
|
||||
|
||||
openFirewall = mkOption {
|
||||
@@ -51,10 +62,6 @@ in {
|
||||
}
|
||||
];
|
||||
|
||||
systemd.tmpfiles.rules = [
|
||||
"d '${cfg.stateDir}' 0700 radarr root - -"
|
||||
];
|
||||
|
||||
services.radarr = {
|
||||
enable = cfg.enable;
|
||||
user = "radarr";
|
||||
|
||||
@@ -13,9 +13,20 @@ in {
|
||||
stateDir = mkOption {
|
||||
type = types.path;
|
||||
default = "${nixarr.stateDir}/readarr";
|
||||
defaultText = literalExpression ''!cfg.vpn.enable'';
|
||||
example = "/home/user/.local/share/nixarr/readarr";
|
||||
description = "The state directory for Readarr";
|
||||
defaultText = literalExpression ''"''${nixarr.stateDir}/readarr"'';
|
||||
example = "/nixarr/.state/readarr";
|
||||
description = ''
|
||||
The location of the state directory for the Readarr service.
|
||||
|
||||
**Warning:** Setting this to any path, where the subpath is not
|
||||
owned by root, will fail! For example:
|
||||
|
||||
```nix
|
||||
stateDir = /home/user/nixarr/.state/readarr
|
||||
```
|
||||
|
||||
Is not supported, because `/home/user` is owned by `user`.
|
||||
'';
|
||||
};
|
||||
|
||||
openFirewall = mkOption {
|
||||
@@ -49,10 +60,6 @@ in {
|
||||
}
|
||||
];
|
||||
|
||||
systemd.tmpfiles.rules = [
|
||||
"d '${cfg.stateDir}' 0700 readarr root - -"
|
||||
];
|
||||
|
||||
services.readarr = {
|
||||
enable = cfg.enable;
|
||||
user = "readarr";
|
||||
|
||||
@@ -19,9 +19,20 @@ in {
|
||||
stateDir = mkOption {
|
||||
type = types.path;
|
||||
default = "${nixarr.stateDir}/sonarr";
|
||||
defaultText = literalExpression ''!cfg.vpn.enable'';
|
||||
example = "/home/user/.local/share/nixarr/sonarr";
|
||||
description = "The state directory for Sonarr.";
|
||||
defaultText = literalExpression ''"''${nixarr.stateDir}/sonarr"'';
|
||||
example = "/nixarr/.state/sonarr";
|
||||
description = ''
|
||||
The location of the state directory for the Sonarr service.
|
||||
|
||||
**Warning:** Setting this to any path, where the subpath is not
|
||||
owned by root, will fail! For example:
|
||||
|
||||
```nix
|
||||
stateDir = /home/user/nixarr/.state/sonarr
|
||||
```
|
||||
|
||||
Is not supported, because `/home/user` is owned by `user`.
|
||||
'';
|
||||
};
|
||||
|
||||
openFirewall = mkOption {
|
||||
@@ -55,10 +66,6 @@ in {
|
||||
}
|
||||
];
|
||||
|
||||
systemd.tmpfiles.rules = [
|
||||
"d '${cfg.stateDir}' 0700 sonarr root - -"
|
||||
];
|
||||
|
||||
services.sonarr = {
|
||||
enable = cfg.enable;
|
||||
user = "sonarr";
|
||||
|
||||
@@ -67,10 +67,19 @@ in {
|
||||
stateDir = mkOption {
|
||||
type = types.path;
|
||||
default = "${nixarr.stateDir}/transmission";
|
||||
defaultText = literalExpression ''!cfg.vpn.enable'';
|
||||
example = "/home/user/.local/share/nixarr/transmission";
|
||||
defaultText = literalExpression ''"''${nixarr.stateDir}/transmission"'';
|
||||
example = "/nixarr/.state/transmission";
|
||||
description = ''
|
||||
The state directory for Transmission.
|
||||
The location of the state directory for the Transmission service.
|
||||
|
||||
**Warning:** Setting this to any path, where the subpath is not
|
||||
owned by root, will fail! For example:
|
||||
|
||||
```nix
|
||||
stateDir = /home/user/nixarr/.state/transmission
|
||||
```
|
||||
|
||||
Is not supported, because `/home/user` is owned by `user`.
|
||||
'';
|
||||
};
|
||||
|
||||
@@ -127,9 +136,18 @@ in {
|
||||
type = types.path;
|
||||
default = "${nixarr.stateDir}/cross-seed";
|
||||
defaultText = literalExpression ''"''${nixarr.stateDir}/cross-seed"'';
|
||||
example = "/home/user/.local/share/nixarr/cross-seed";
|
||||
example = "/nixarr/.state/cross-seed";
|
||||
description = ''
|
||||
The state directory for Transmission.
|
||||
The location of the state directory for the cross-seed service.
|
||||
|
||||
**Warning:** Setting this to any path, where the subpath is not
|
||||
owned by root, will fail! For example:
|
||||
|
||||
```nix
|
||||
stateDir = /home/user/nixarr/.state/cross-seed
|
||||
```
|
||||
|
||||
Is not supported, because `/home/user` is owned by `user`.
|
||||
'';
|
||||
};
|
||||
|
||||
@@ -235,8 +253,7 @@ in {
|
||||
"d '${cfg.stateDir}' 0750 torrenter torrenter - -"
|
||||
# This is fixes a bug in nixpks (https://github.com/NixOS/nixpkgs/issues/291883)
|
||||
"d '${cfg.stateDir}/.config/transmission-daemon' 0750 torrenter torrenter - -"
|
||||
] ++ optional cfg-cross-seed.enable
|
||||
"d '${cfg-cross-seed.stateDir}' 0700 cross-seed root - -";
|
||||
];
|
||||
|
||||
util-nixarr.services.cross-seed = mkIf cfg-cross-seed.enable {
|
||||
enable = true;
|
||||
|
||||
Reference in New Issue
Block a user