[yevaud] Modularise forgejo config
This commit is contained in:
parent
c680907894
commit
c8da705e4b
|
@ -1,49 +1,16 @@
|
||||||
{ config, lib, pkgs, ... }:
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
imports =
|
imports = [
|
||||||
[
|
./hardware-configuration.nix
|
||||||
./hardware-configuration.nix
|
./home.nix
|
||||||
./home.nix
|
../../services/openssh.nix
|
||||||
../../services/nginx.nix
|
./forgejo.nix
|
||||||
../../services/openssh.nix
|
];
|
||||||
];
|
|
||||||
|
|
||||||
boot.loader.systemd-boot.enable = true;
|
boot.loader.systemd-boot.enable = true;
|
||||||
boot.loader.efi.canTouchEfiVariables = true;
|
boot.loader.efi.canTouchEfiVariables = true;
|
||||||
|
|
||||||
services.nginx.virtualHosts = {
|
|
||||||
"git.katherina.rocks" = {
|
|
||||||
forceSSL = true;
|
|
||||||
enableACME = true;
|
|
||||||
locations."/".proxyPass = "http://[::1]:3000/";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
services.forgejo = {
|
|
||||||
enable = true;
|
|
||||||
stateDir = "/data/forgejo";
|
|
||||||
settings = {
|
|
||||||
DEFAULT.APP_NAME = "git.katherina.rocks";
|
|
||||||
cache = {
|
|
||||||
ADAPTER = "twoqueue";
|
|
||||||
HOST = ''{"size": 100, "recent_ratio": 0.25, "ghost_ratio": 0.5}'';
|
|
||||||
};
|
|
||||||
database = {
|
|
||||||
DB_TYPE = "sqlite3";
|
|
||||||
SQLITE_JOURNAL_MODE = "WAL";
|
|
||||||
};
|
|
||||||
security.LOGIN_REMEMBER_DAYS = 365;
|
|
||||||
server = {
|
|
||||||
DOMAIN = "git.katherina.rocks";
|
|
||||||
HTTP_PORT = 3000;
|
|
||||||
ROOT_URL = "https://git.katherina.rocks/";
|
|
||||||
};
|
|
||||||
service.DISABLE_REGISTRATION = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
system.stateVersion = "23.11";
|
system.stateVersion = "23.11";
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
43
hosts/yevaud/forgejo.nix
Normal file
43
hosts/yevaud/forgejo.nix
Normal file
|
@ -0,0 +1,43 @@
|
||||||
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
../../services/nginx.nix
|
||||||
|
];
|
||||||
|
|
||||||
|
# TODO: ssh access
|
||||||
|
# TODO: email out
|
||||||
|
# TODO: interface customisation
|
||||||
|
|
||||||
|
services.nginx.virtualHosts = {
|
||||||
|
# TODO: move to new domain
|
||||||
|
"git.katherina.rocks" = {
|
||||||
|
forceSSL = true;
|
||||||
|
enableACME = true;
|
||||||
|
locations."/".proxyPass = "http://[::1]:3000/";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
services.forgejo = {
|
||||||
|
enable = true;
|
||||||
|
stateDir = "/data/forgejo";
|
||||||
|
settings = {
|
||||||
|
DEFAULT.APP_NAME = "git.katherina.rocks";
|
||||||
|
cache = {
|
||||||
|
ADAPTER = "twoqueue";
|
||||||
|
HOST = ''{"size": 100, "recent_ratio": 0.25, "ghost_ratio": 0.5}'';
|
||||||
|
};
|
||||||
|
database = {
|
||||||
|
DB_TYPE = "sqlite3";
|
||||||
|
SQLITE_JOURNAL_MODE = "WAL";
|
||||||
|
};
|
||||||
|
security.LOGIN_REMEMBER_DAYS = 365;
|
||||||
|
server = {
|
||||||
|
DOMAIN = "git.katherina.rocks";
|
||||||
|
HTTP_PORT = 3000;
|
||||||
|
ROOT_URL = "https://git.katherina.rocks/";
|
||||||
|
};
|
||||||
|
service.DISABLE_REGISTRATION = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
Loading…
Reference in a new issue