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
@@ -21,7 +21,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 Readarr traffic through the VPN.
'';
@@ -29,6 +29,16 @@ in {
};
config = mkIf cfg.enable {
assertions = [
{
assertion = cfg.vpn.enable && !nixarr.vpn.enable;
message = ''
The nixarr.readarr.vpn.enable option requires the
nixarr.vpn.enable option to be set, but it was not.
'';
}
];
systemd.tmpfiles.rules = [
"d '${cfg.stateDir}' 0700 readarr root - -"
];