Added rest of assertions and fixed docs issue

This commit is contained in:
rasmus-kirk
2024-02-27 18:07:36 +01:00
parent 5d6ee98d06
commit 84303df9a4
9 changed files with 100 additions and 17 deletions
+11 -1
View File
@@ -27,7 +27,7 @@ in {
type = types.bool;
default = false;
description = ''
**Required options:** [`nixarr.vpn.enable`](/options.html#nixarr.vpn.enable)
**Required options:** [`nixarr.vpn.enable`](#nixarr.vpn.enable)
Route Sonarr traffic through the VPN.
'';
@@ -35,6 +35,16 @@ in {
};
config = mkIf cfg.enable {
assertions = [
{
assertion = cfg.vpn.enable && !nixarr.vpn.enable;
message = ''
The nixarr.sonarr.vpn.enable option requires the
nixarr.vpn.enable option to be set, but it was not.
'';
}
];
systemd.tmpfiles.rules = [
"d '${cfg.stateDir}' 0700 sonarr root - -"
];