tadpole: Assert that nginx is running when using gitea

This commit is contained in:
Alexander Heldt
2025-01-02 19:34:03 +01:00
parent 4663a710dc
commit d0a9202615

View File

@@ -7,8 +7,6 @@
let let
conf = config.mod.gitea; conf = config.mod.gitea;
gitDomain = "git.${conf.baseDomain}"; gitDomain = "git.${conf.baseDomain}";
nginxEnable = config.mod.nginx.enable;
in in
{ {
options = { options = {
@@ -37,8 +35,12 @@ in
}; };
}; };
config = lib.mkIf (conf.enable && nginxEnable) { config = lib.mkIf conf.enable {
assertions = [ assertions = [
{
assertion = config.services.nginx.enable;
message = "Option 'config.services.nginx' must be enabled";
}
{ {
assertion = conf.baseDomain != ""; assertion = conf.baseDomain != "";
message = "Option 'mod.gitea.baseDomain' cannot be empty"; message = "Option 'mod.gitea.baseDomain' cannot be empty";