From 98db29967fbfdb8e1e255f2e87e7ea9eeb0044e4 Mon Sep 17 00:00:00 2001 From: Martin Fischer Date: Wed, 14 Jan 2026 17:22:20 +0100 Subject: [PATCH] nixos/cgit: make checkExportOkFiles not nullable again When I introduced the checkExportOkFiles option in a722a999d1af37d9f3760680dc50fc598fce01a6 I missed `(cfg.settings ? strict-export)` in the assertions. This was fixed in bf9ccd1a685070e5532191e34858e870d3543aa1 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. --- nixos/modules/services/networking/cgit.nix | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/nixos/modules/services/networking/cgit.nix b/nixos/modules/services/networking/cgit.nix index db0fa913cde4..49cbbfe2c9c8 100644 --- a/nixos/modules/services/networking/cgit.nix +++ b/nixos/modules/services/networking/cgit.nix @@ -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