diff options
author | Maximilian Bosch <maximilian@mbosch.me> | 2019-01-14 15:56:20 +0100 |
---|---|---|
committer | Maximilian Bosch <maximilian@mbosch.me> | 2019-01-14 16:04:02 +0100 |
commit | ad3a50e25bf2fa029ce772b443b1717ebdb67f4a (patch) | |
tree | b8ae7e11190d5f4ddd40cf4e968528a67dbb618e /nixos/tests/gitea.nix | |
parent | 9651cc7a93a2d71aad0eea00dbde7cce77735b18 (diff) |
nixos/gitea: add option to disable registration
Although this can be added to `extraOptions` I figured that it makes sense to add an option to explicitly promote this feature in our documentation since most of the self-hosted gitea instances won't be intended for common use I guess. Also added a notice that this should be added after the initial deploy as you have to register yourself using that feature unless the install wizard is used.
Diffstat (limited to 'nixos/tests/gitea.nix')
-rw-r--r-- | nixos/tests/gitea.nix | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/nixos/tests/gitea.nix b/nixos/tests/gitea.nix index 3543349918521..28e6479e9cbed 100644 --- a/nixos/tests/gitea.nix +++ b/nixos/tests/gitea.nix @@ -64,6 +64,7 @@ with pkgs.lib; machine = { config, pkgs, ... }: { services.gitea.enable = true; + services.gitea.disableRegistration = true; }; testScript = '' @@ -72,6 +73,7 @@ with pkgs.lib; $machine->waitForUnit('gitea.service'); $machine->waitForOpenPort('3000'); $machine->succeed("curl --fail http://localhost:3000/"); + $machine->succeed("curl --fail http://localhost:3000/user/sign_up | grep 'Registration is disabled. Please contact your site administrator.'"); ''; }; } |