gitea adminify
This commit is contained in:
@@ -117,6 +117,7 @@ in {
|
|||||||
envFile = config.sops.secrets."ETHERPAD".path;
|
envFile = config.sops.secrets."ETHERPAD".path;
|
||||||
script = pkgs.writeShellScript "setup" ''
|
script = pkgs.writeShellScript "setup" ''
|
||||||
echo "$APIKEY" > ${serverCfg.configPath}/etherpad/APIKEY.txt
|
echo "$APIKEY" > ${serverCfg.configPath}/etherpad/APIKEY.txt
|
||||||
|
chmod 444 ${serverCfg.configPath}/etherpad/APIKEY.txt
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -82,4 +82,18 @@ in {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
setup = {
|
||||||
|
trigger = "server";
|
||||||
|
script = pkgs.writeShellScript "setup" ''
|
||||||
|
# Define the command wrapper
|
||||||
|
GT="${pkgs.podman}/bin/podman --events-backend=none exec --env-file ${config.sops.secrets."CUSTOM".path} -e DOMAIN=${serverCfg.hostDomain} -u root gitea-server gitea"
|
||||||
|
|
||||||
|
$GT admin user create --admin --username "$DEFAULT_ADMIN_USERNAME" --password "$DEFAULT_ADMIN_PASSWORD" --email "$DEFAULT_ADMIN_EMAIL" || true
|
||||||
|
$GT admin user change --username "$DEFAULT_ADMIN_USERNAME" --admin
|
||||||
|
|
||||||
|
echo "Completed Gitea Setup"
|
||||||
|
'';
|
||||||
|
};
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user