Added assertions

This commit is contained in:
rasmus-kirk
2024-06-24 12:15:46 +02:00
parent ef9d27acdf
commit 8b1e2a8c1f
10 changed files with 170 additions and 19 deletions
+17 -1
View File
@@ -12,7 +12,16 @@ in {
];
options.nixarr.bazarr = {
enable = mkEnableOption "the bazarr service.";
enable = mkOption {
type = types.bool;
default = false;
example = true;
description = ''
Whether or not to enable the Bazarr service.
**Required options:** [`nixarr.enable`](#nixarr.enable)
'';
};
stateDir = mkOption {
type = types.path;
@@ -62,6 +71,13 @@ in {
nixarr.vpn.enable option to be set, but it was not.
'';
}
{
assertion = cfg.enable -> nixarr.enable;
message = ''
The nixarr.bazarr.enable option requires the nixarr.enable option
to be set, but it was not.
'';
}
];
util-nixarr.services.bazarr = {