nixos/cgit: make checkExportOkFiles not nullable again

When I introduced the checkExportOkFiles option in
a722a999d1 I missed `(cfg.settings ? strict-export)`
in the assertions. This was fixed in bf9ccd1a68
but 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:
Martin Fischer
2026-01-14 17:22:20 +01:00
parent 0513af79f1
commit 98db29967f
+1 -7
View File
@@ -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