Updated docs and removed some superflous statedirs from systemd-tmpfiles

This commit is contained in:
rasmus-kirk
2024-03-12 23:29:56 +01:00
parent 96fffa452d
commit 83e3246489
10 changed files with 152 additions and 62 deletions
+14 -7
View File
@@ -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";