Prep git forge

This commit is contained in:
Daniel Flanagan 2024-09-06 15:39:26 -05:00
parent 6f1b5bb86d
commit 72a49c2f28

View file

@ -739,106 +739,116 @@ sudo nix run nixpkgs#ipmitool -- raw 0x30 0x30 0x02 0xff 0x00
# acmeCA = "https://acme-staging-v02.api.letsencrypt.org/directory"; # acmeCA = "https://acme-staging-v02.api.letsencrypt.org/directory";
}; };
} }
# { {
# services.forgejo = { systemd.tmpfiles.settings = {
"10-backups" = {
"/storage/forgejo" = {
"d" = {
mode = "0700";
user = "forgejo";
group = "nogroup";
};
};
};
};
services.forgejo = {
enable = false;
stateDir = "/storage/forgejo";
settings = {
DEFAULT = {
APP_NAME = "git.lyte.dev";
};
server = {
ROOT_URL = "https://git.lyte.dev";
HTTP_ADDR = "127.0.0.1";
HTTP_PORT = 3088;
DOMAIN = "git.lyte.dev";
};
actions = {
ENABLED = true;
};
service = {
DISABLE_REGISTRATION = true;
};
session = {
COOKIE_SECURE = true;
};
log = {
# LEVEL = "Debug";
};
ui = {
THEMES = "forgejo-auto,forgejo-light,forgejo-dark";
DEFAULT_THEME = "forgejo-auto";
};
indexer = {
REPO_INDEXER_ENABLED = "true";
REPO_INDEXER_PATH = "indexers/repos.bleve";
MAX_FILE_SIZE = "1048576";
# REPO_INDEXER_INCLUDE =
REPO_INDEXER_EXCLUDE = "resources/bin/**";
};
};
lfs = {
enable = true;
};
dump = {
enable = true;
};
database = {
# TODO: move to postgres?
type = "sqlite3";
};
};
services.gitea-actions-runner = {
# TODO: simple git-based automation would be dope? maybe especially for
# mirroring to github super easy?
# enable = true; # enable = true;
# stateDir = "/storage/forgejo"; package = pkgs.forgejo-runner;
# settings = { instances."beefcake" = {
# DEFAULT = { enable = false;
# APP_NAME = "git.lyte.dev"; name = "beefcake";
# }; url = "https://git.lyte.dev";
# server = { settings = {
# ROOT_URL = "https://git.lyte.dev"; container = {
# HTTP_ADDR = "127.0.0.1"; # use the shared network which is bridged by default
# HTTP_PORT = 3088; # this lets us hit git.lyte.dev just fine
# DOMAIN = "git.lyte.dev"; network = "podman";
# }; };
# actions = { };
# ENABLED = true; labels = [
# }; # type ":host" does not depend on docker/podman/lxc
# service = { "podman"
# DISABLE_REGISTRATION = true; "nix:docker://git.lyte.dev/lytedev/nix:latest"
# }; "beefcake:host"
# session = { "nixos-host:host"
# COOKIE_SECURE = true; ];
# }; tokenFile = config.sops.secrets."forgejo-runner.env".path;
# log = { hostPackages = with pkgs; [
# # TODO: raise the log level nix
# # LEVEL = "Debug"; bash
# }; coreutils
# ui = { curl
# THEMES = "forgejo-auto,forgejo-light,forgejo-dark,catppuccin-mocha-sapphire"; gawk
# DEFAULT_THEME = "forgejo-auto"; gitMinimal
# }; gnused
# indexer = { nodejs
# REPO_INDEXER_ENABLED = "true"; gnutar # needed for cache action
# REPO_INDEXER_PATH = "indexers/repos.bleve"; wget
# MAX_FILE_SIZE = "1048576"; ];
# # REPO_INDEXER_INCLUDE = };
# REPO_INDEXER_EXCLUDE = "resources/bin/**"; };
# }; # environment.systemPackages = with pkgs; [nodejs];
# }; services.caddy.virtualHosts."git.lyte.dev" = {
# lfs = { extraConfig = ''
# enable = true; reverse_proxy :${toString config.services.forgejo.settings.server.HTTP_PORT}
# }; '';
# dump = { };
# enable = true; services.caddy.virtualHosts."http://git.beefcake.lan" = {
# }; extraConfig = ''
# database = { reverse_proxy :${toString config.services.forgejo.settings.server.HTTP_PORT}
# # TODO: move to postgres? '';
# type = "sqlite3"; };
# }; }
# };
# services.gitea-actions-runner = {
# # TODO: simple git-based automation would be dope? maybe especially for
# # mirroring to github super easy?
# # enable = true;
# package = pkgs.forgejo-runner;
# instances."beefcake" = {
# enable = true;
# name = "beefcake";
# url = "https://git.lyte.dev";
# settings = {
# container = {
# # use the shared network which is bridged by default
# # this lets us hit git.lyte.dev just fine
# network = "podman";
# };
# };
# labels = [
# # type ":host" does not depend on docker/podman/lxc
# "podman"
# "nix:docker://git.lyte.dev/lytedev/nix:latest"
# "beefcake:host"
# "nixos-host:host"
# ];
# tokenFile = config.sops.secrets."forgejo-runner.env".path;
# hostPackages = with pkgs; [
# nix
# bash
# coreutils
# curl
# gawk
# gitMinimal
# gnused
# nodejs
# gnutar # needed for cache action
# wget
# ];
# };
# };
# # environment.systemPackages = with pkgs; [nodejs];
# services.caddy.virtualHosts."git.lyte.dev" = {
# extraConfig = ''
# reverse_proxy :${toString config.services.forgejo.settings.server.HTTP_PORT}
# '';
# };
# services.caddy.virtualHosts."http://git.beefcake.lan" = {
# extraConfig = ''
# reverse_proxy :${toString config.services.forgejo.settings.server.HTTP_PORT}
# '';
# };
# }
# { # {
# services.vaultwarden = { # services.vaultwarden = {
# enable = true; # enable = true;