mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-12 20:55:31 +03:00
nixos/gitea: drop useWizard (#413325)
This commit is contained in:
commit
bbedaa5b3d
1 changed files with 52 additions and 57 deletions
|
@ -79,8 +79,13 @@ in
|
||||||
)
|
)
|
||||||
|
|
||||||
(mkRemovedOptionModule [ "services" "gitea" "ssh" "enable" ]
|
(mkRemovedOptionModule [ "services" "gitea" "ssh" "enable" ]
|
||||||
"services.gitea.ssh.enable has been migrated into freeform setting services.gitea.settings.server.DISABLE_SSH. Keep in mind that the setting is inverted"
|
"It has been migrated into freeform setting services.gitea.settings.server.DISABLE_SSH. Keep in mind that the setting is inverted."
|
||||||
)
|
)
|
||||||
|
(mkRemovedOptionModule [
|
||||||
|
"services"
|
||||||
|
"gitea"
|
||||||
|
"useWizard"
|
||||||
|
] "Has been removed because it was broken and lacked automated testing.")
|
||||||
];
|
];
|
||||||
|
|
||||||
options = {
|
options = {
|
||||||
|
@ -93,12 +98,6 @@ in
|
||||||
|
|
||||||
package = mkPackageOption pkgs "gitea" { };
|
package = mkPackageOption pkgs "gitea" { };
|
||||||
|
|
||||||
useWizard = mkOption {
|
|
||||||
default = false;
|
|
||||||
type = types.bool;
|
|
||||||
description = "Do not generate a configuration and use gitea' installation wizard instead. The first registered user will be administrator.";
|
|
||||||
};
|
|
||||||
|
|
||||||
stateDir = mkOption {
|
stateDir = mkOption {
|
||||||
default = "/var/lib/gitea";
|
default = "/var/lib/gitea";
|
||||||
type = types.str;
|
type = types.str;
|
||||||
|
@ -495,9 +494,7 @@ in
|
||||||
This can be disabled by using this option.
|
This can be disabled by using this option.
|
||||||
|
|
||||||
*Note:* please keep in mind that this should be added after the initial
|
*Note:* please keep in mind that this should be added after the initial
|
||||||
deploy unless [](#opt-services.gitea.useWizard)
|
deploy as the first registered user will be the administrator.
|
||||||
is `true` as the first registered user will be the administrator if
|
|
||||||
no install wizard is used.
|
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -752,7 +749,6 @@ in
|
||||||
in
|
in
|
||||||
''
|
''
|
||||||
# copy custom configuration and generate random secrets if needed
|
# copy custom configuration and generate random secrets if needed
|
||||||
${optionalString (!cfg.useWizard) ''
|
|
||||||
function gitea_setup {
|
function gitea_setup {
|
||||||
cp -f '${configFile}' '${runConfig}'
|
cp -f '${configFile}' '${runConfig}'
|
||||||
|
|
||||||
|
@ -807,7 +803,6 @@ in
|
||||||
chmod u-w '${runConfig}'
|
chmod u-w '${runConfig}'
|
||||||
}
|
}
|
||||||
(umask 027; gitea_setup)
|
(umask 027; gitea_setup)
|
||||||
''}
|
|
||||||
|
|
||||||
# run migrations/init the database
|
# run migrations/init the database
|
||||||
${exe} migrate
|
${exe} migrate
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue