Added rest of assertions and fixed docs issue
This commit is contained in:
@@ -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 - -"
|
||||
];
|
||||
|
||||
Reference in New Issue
Block a user