mirror of
https://git.sr.ht/~magic_rb/dotfiles
synced 2024-11-25 09:36:14 +01:00
Reformat gitea container nix file and switch to Forgejo
Signed-off-by: magic_rb <magic_rb@redalder.org>
This commit is contained in:
parent
1fbdca74bc
commit
4d4fea63c4
|
@ -1,17 +1,21 @@
|
|||
{ inputs, lib, ... }:
|
||||
let
|
||||
inherit (lib)
|
||||
singleton;
|
||||
in
|
||||
{
|
||||
inputs,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit
|
||||
(lib)
|
||||
singleton
|
||||
;
|
||||
in {
|
||||
flake.nixngConfigurations.gitea = inputs.nixng.nglib.makeSystem {
|
||||
system = "x86_64-linux";
|
||||
name = "nixng-gitea";
|
||||
inherit (inputs)
|
||||
nixpkgs;
|
||||
config =
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
inherit
|
||||
(inputs)
|
||||
nixpkgs
|
||||
;
|
||||
config = {pkgs, ...}: {
|
||||
dumb-init = {
|
||||
enable = true;
|
||||
type.services = {};
|
||||
|
@ -20,22 +24,21 @@ in
|
|||
services.mysql = {
|
||||
enable = true;
|
||||
|
||||
package = pkgs.mariadb_105;
|
||||
|
||||
ensureDatabases = singleton "gitea";
|
||||
ensureUsers = singleton {
|
||||
name = "gitea";
|
||||
ensurePermissions = {
|
||||
"database.*" = "ALL PRIVILEGES";
|
||||
"gitea.*" = "ALL PRIVILEGES";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
init.services.gitea.shutdownOnExit = true;
|
||||
init.services.gitea.shutdownOnExit = false;
|
||||
services.gitea = {
|
||||
enable = true;
|
||||
|
||||
appName = "Red Alder Gitea";
|
||||
runMode = "prod";
|
||||
user = "gitea";
|
||||
package = pkgs.gitea;
|
||||
|
||||
secrets = {
|
||||
secretKeyFile = "/secrets/secret_key";
|
||||
|
@ -44,7 +47,15 @@ in
|
|||
lfsJwtSecretFile = "/secrets/lfs_jwt_secret";
|
||||
};
|
||||
|
||||
configuration = {
|
||||
settings = {
|
||||
appName = "Red Alder Gitea";
|
||||
runMode = "prod";
|
||||
runUser = "gitea";
|
||||
|
||||
DEFAULT = {
|
||||
WORK_PATH = "/data/gitea";
|
||||
};
|
||||
|
||||
repository = {
|
||||
ROOT = "/data/gitea/git/repositories";
|
||||
};
|
||||
|
@ -62,6 +73,7 @@ in
|
|||
SSH_DOMAIN = "localhost";
|
||||
HTTP_PORT = 3000;
|
||||
ROOT_URL = "https://gitea.redalder.org/";
|
||||
STATIC_ROOT_PATH = "${pkgs.gitea.data}";
|
||||
DISABLE_SSH = false;
|
||||
SSH_PORT = 22;
|
||||
SSH_LISTEN_PORT = 22;
|
||||
|
|
Loading…
Reference in a new issue