diff options
author | Vladyslav M <dywedir@pm.me> | 2019-01-15 23:55:16 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-01-15 23:55:16 +0200 |
commit | 95a0e2438158bd80239e38b123040d6b81a1aba5 (patch) | |
tree | 322a8d56657a83d8479262f381863d206e275c55 /nixos/modules | |
parent | 121318a9b47fa6422f0e7e44343a05067c4293c6 (diff) | |
parent | f90bd42c8966c0de583487b3ac262e35b06cbd99 (diff) | |
download | nixpkgs-95a0e2438158bd80239e38b123040d6b81a1aba5.tar nixpkgs-95a0e2438158bd80239e38b123040d6b81a1aba5.tar.gz nixpkgs-95a0e2438158bd80239e38b123040d6b81a1aba5.tar.bz2 nixpkgs-95a0e2438158bd80239e38b123040d6b81a1aba5.tar.lz nixpkgs-95a0e2438158bd80239e38b123040d6b81a1aba5.tar.xz nixpkgs-95a0e2438158bd80239e38b123040d6b81a1aba5.tar.zst nixpkgs-95a0e2438158bd80239e38b123040d6b81a1aba5.zip |
Merge pull request #53952 from Ma27/improve-gitea-module
nixos/gitea: minor fixes
Diffstat (limited to 'nixos/modules')
-rw-r--r-- | nixos/modules/services/misc/gitea.nix | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/nixos/modules/services/misc/gitea.nix b/nixos/modules/services/misc/gitea.nix index 7a10bd87299..be4d3871978 100644 --- a/nixos/modules/services/misc/gitea.nix +++ b/nixos/modules/services/misc/gitea.nix @@ -46,6 +46,9 @@ let ROOT_PATH = ${cfg.log.rootPath} LEVEL = ${cfg.log.level} + [service] + DISABLE_REGISTRATION = ${boolToString cfg.disableRegistration} + ${cfg.extraConfig} ''; in @@ -248,6 +251,18 @@ in description = "Upper level of template and static files path."; }; + disableRegistration = mkEnableOption "the registration lock" // { + description = '' + By default any user can create an account on this <literal>gitea</literal> instance. + This can be disabled by using this option. + + <emphasis>Note:</emphasis> please keep in mind that this should be added after the initial + deploy unless <link linkend="opt-services.gitea.useWizard">services.gitea.useWizard</link> + is <literal>true</literal> as the first registered user will be the administrator if + no install wizard is used. + ''; + }; + extraConfig = mkOption { type = types.str; default = ""; @@ -263,7 +278,7 @@ in description = "gitea"; after = [ "network.target" ] ++ lib.optional usePostgresql "postgresql.service" ++ lib.optional useMysql "mysql.service"; wantedBy = [ "multi-user.target" ]; - path = [ gitea.bin ]; + path = [ gitea.bin pkgs.gitAndTools.git ]; preStart = let runConfig = "${cfg.stateDir}/custom/conf/app.ini"; |