nixos/cgit: make checkExportOkFiles not nullable again
When I introduced the checkExportOkFiles option ina722a999d1I missed `(cfg.settings ? strict-export)` in the assertions. This was fixed inbf9ccd1a68but that also made the option nullable (which is confusing for a required option) and introduced a small type error. This now makes the option not nullable again and also fixes the type error. Fixes #478320.
This commit is contained in:
@@ -217,8 +217,7 @@ in
|
||||
When enabled you must also configure `strict-export = "git-daemon-export-ok"`
|
||||
in `settings` to make cgit check for the same files.
|
||||
'';
|
||||
type = lib.types.nullOr lib.types.bool;
|
||||
default = null;
|
||||
type = lib.types.bool;
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -234,11 +233,6 @@ in
|
||||
assertion = !cfg.enable || (cfg.scanPath == null) != (cfg.repos == { });
|
||||
message = "Misconfigured services.cgit.${vhost}: Exactly one of scanPath or repos must be set.";
|
||||
}
|
||||
{
|
||||
assertion =
|
||||
cfg.enable -> cfg.gitHttpBackend.enable -> cfg.gitHttpBackend.checkExportOkFiles != null;
|
||||
message = "Misconfigured services.cgit.${vhost}: When gitHttpBackend.enable is true then gitHttpBackend.checkExportOkFiles must be set, see the documentation for the option for further information.";
|
||||
}
|
||||
{
|
||||
assertion =
|
||||
cfg.enable
|
||||
|
||||
Reference in New Issue
Block a user