nixos/gitlab: Fix error when GitLab Pages is not enabled

Even if GitLab is used without Pages, some of its settings are still
used in the gitlab.yml file, resulting in errors such as

error: The option `services.gitlab.pages.settings.pages-domain' is used but not defined.

To fix this, make the settings' usage conditional on Pages being
enabled.
This commit is contained in:
talyz 2023-03-18 11:34:51 +01:00
parent 1ec2a95c67
commit ccaa6078ba
No known key found for this signature in database
GPG Key ID: 2DED2151F4671A2B

View File

@ -156,7 +156,7 @@ let
};
extra = {};
uploads.storage_path = cfg.statePath;
pages = {
pages = optionalAttrs cfg.pages.enable {
enabled = cfg.pages.enable;
port = 8090;
host = cfg.pages.settings.pages-domain;