nixos/gitea: fix statix warnings
This commit is contained in:
parent
5f9b871b72
commit
236b053413
1 changed files with 4 additions and 4 deletions
|
@ -85,7 +85,7 @@ in
|
||||||
|
|
||||||
port = mkOption {
|
port = mkOption {
|
||||||
type = types.port;
|
type = types.port;
|
||||||
default = (if !usePostgresql then 3306 else pg.port);
|
default = if !usePostgresql then 3306 else pg.port;
|
||||||
defaultText = literalExpression ''
|
defaultText = literalExpression ''
|
||||||
if config.${opt.database.type} != "postgresql"
|
if config.${opt.database.type} != "postgresql"
|
||||||
then 3306
|
then 3306
|
||||||
|
@ -502,7 +502,7 @@ in
|
||||||
replaceSecretBin = "${pkgs.replace-secret}/bin/replace-secret";
|
replaceSecretBin = "${pkgs.replace-secret}/bin/replace-secret";
|
||||||
in ''
|
in ''
|
||||||
# copy custom configuration and generate a random secret key if needed
|
# copy custom configuration and generate a random secret key if needed
|
||||||
${optionalString (cfg.useWizard == false) ''
|
${optionalString (!cfg.useWizard) ''
|
||||||
function gitea_setup {
|
function gitea_setup {
|
||||||
cp -f ${configFile} ${runConfig}
|
cp -f ${configFile} ${runConfig}
|
||||||
|
|
||||||
|
@ -622,10 +622,10 @@ in
|
||||||
|
|
||||||
# Create database passwordFile default when password is configured.
|
# Create database passwordFile default when password is configured.
|
||||||
services.gitea.database.passwordFile =
|
services.gitea.database.passwordFile =
|
||||||
(mkDefault (toString (pkgs.writeTextFile {
|
mkDefault (toString (pkgs.writeTextFile {
|
||||||
name = "gitea-database-password";
|
name = "gitea-database-password";
|
||||||
text = cfg.database.password;
|
text = cfg.database.password;
|
||||||
})));
|
}));
|
||||||
|
|
||||||
systemd.services.gitea-dump = mkIf cfg.dump.enable {
|
systemd.services.gitea-dump = mkIf cfg.dump.enable {
|
||||||
description = "gitea dump";
|
description = "gitea dump";
|
||||||
|
|
Loading…
Reference in a new issue