about summary refs log tree commit diff
path: root/nixos
diff options
context:
space:
mode:
authortalyz <kim.lindberger@gmail.com>2023-03-18 11:34:51 +0100
committertalyz <kim.lindberger@gmail.com>2023-03-18 11:34:51 +0100
commitccaa6078baed0531eeeb6e788febe81aba461d65 (patch)
treec2ac0007ef42b36b598cbb1806eef853f3dfe76b /nixos
parent1ec2a95c672e2bfc1836a028cc427474d50c1bb2 (diff)
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.
Diffstat (limited to 'nixos')
-rw-r--r--nixos/modules/services/misc/gitlab.nix2
1 files changed, 1 insertions, 1 deletions
diff --git a/nixos/modules/services/misc/gitlab.nix b/nixos/modules/services/misc/gitlab.nix
index c7299c1ccad86..d278b571a6410 100644
--- a/nixos/modules/services/misc/gitlab.nix
+++ b/nixos/modules/services/misc/gitlab.nix
@@ -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;