commit message
This commit is contained in:
parent
270e1a0be4
commit
77afca4525
57 changed files with 971 additions and 423 deletions
34
modules/server/misc/dawarich.nix
Normal file
34
modules/server/misc/dawarich.nix
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
options = {
|
||||
server.misc.dawarich = {
|
||||
enable = lib.mkEnableOption "enable dawarich";
|
||||
port = lib.mkOption {
|
||||
default = 2975;
|
||||
description = "dawarich port";
|
||||
};
|
||||
public = lib.mkEnableOption "make dawarich public";
|
||||
subdomain = lib.mkOption {
|
||||
default = "dawarich";
|
||||
description = "dawarich subdomain";
|
||||
};
|
||||
};
|
||||
};
|
||||
config = {
|
||||
services.dawarich = {
|
||||
enable = config.server.misc.dawarich.enable;
|
||||
webPort = config.server.misc.dawarich.port;
|
||||
localDomain =
|
||||
if config.server.misc.dawarich.public then
|
||||
"${config.server.misc.dawarich.subdomain}.${config.networking.domain}"
|
||||
else
|
||||
config.networking.hostName;
|
||||
};
|
||||
};
|
||||
}
|
||||
14
modules/server/misc/default.nix
Normal file
14
modules/server/misc/default.nix
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
imports = [
|
||||
./dawarich.nix
|
||||
./forgejo.nix
|
||||
./lauti.nix
|
||||
];
|
||||
}
|
||||
72
modules/server/misc/forgejo.nix
Normal file
72
modules/server/misc/forgejo.nix
Normal file
|
|
@ -0,0 +1,72 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
options = {
|
||||
server.misc.forgejo = {
|
||||
enable = lib.mkEnableOption "enable forgejo";
|
||||
port = lib.mkOption {
|
||||
default = 2934;
|
||||
description = "forgejo port";
|
||||
};
|
||||
public = lib.mkEnableOption "public forgejo";
|
||||
subdomain = lib.mkOption {
|
||||
default = "git";
|
||||
description = "forgejo subdomain";
|
||||
};
|
||||
settings = {
|
||||
app_name = lib.mkOption {
|
||||
default = "${config.user.userName}'s code dump";
|
||||
description = "forgejo app name";
|
||||
};
|
||||
app_slogan = lib.mkOption {
|
||||
default = "if code could talk, mine would cry";
|
||||
description = "forgejo app slogan";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
config = {
|
||||
services = {
|
||||
forgejo = {
|
||||
enable = config.server.misc.forgejo.enable;
|
||||
database.type = "postgres";
|
||||
settings = {
|
||||
server = {
|
||||
DOMAIN = "${config.server.misc.forgejo.subdomain}.${config.networking.domain}";
|
||||
ROOT_URL = "https://${config.server.misc.forgejo.subdomain}.${config.networking.domain}";
|
||||
HTTP_PORT = config.server.misc.forgejo.port;
|
||||
};
|
||||
DEFAULT = {
|
||||
APP_NAME = config.server.misc.forgejo.settings.app_name;
|
||||
APP_SLOGAN = config.server.misc.forgejo.settings.app_slogan;
|
||||
};
|
||||
REPOSITORY = {
|
||||
ENABLE_PUSH_CREATE_USER = true;
|
||||
ENABLE_PUSH_CREATE_ORG = true;
|
||||
|
||||
};
|
||||
service.DISABLE_REGISTRATION = true;
|
||||
};
|
||||
};
|
||||
nginx = {
|
||||
virtualHosts = {
|
||||
"${config.server.misc.forgejo.subdomain}.${config.networking.domain}" =
|
||||
if config.server.misc.forgejo.public then
|
||||
{
|
||||
enableACME = true;
|
||||
forceSSL = true;
|
||||
locations."/" = {
|
||||
proxyPass = "http://127.0.0.1:${toString config.server.misc.forgejo.port}";
|
||||
};
|
||||
}
|
||||
else
|
||||
{ };
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
51
modules/server/misc/lauti.nix
Normal file
51
modules/server/misc/lauti.nix
Normal file
|
|
@ -0,0 +1,51 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
options = {
|
||||
server.misc.lauti = {
|
||||
enable = lib.mkEnableOption "enable lauti";
|
||||
port = lib.mkOption {
|
||||
default = 3333;
|
||||
description = "lauti port";
|
||||
};
|
||||
public = lib.mkEnableOption "make lauti public";
|
||||
subdomain = lib.mkOption {
|
||||
default = "lauti";
|
||||
description = "lauti subdomain";
|
||||
};
|
||||
};
|
||||
};
|
||||
config = {
|
||||
|
||||
services = {
|
||||
eintopf = {
|
||||
enable = config.server.misc.lauti.enable;
|
||||
settings = {
|
||||
LAUTI_ADMIN_EMAIL = "test@example.org";
|
||||
LAUTI_BASE_URL = "https://freising.space";
|
||||
LAUTI_OSM_TILE_CACHE_DIR = "/var/lib/eintopf/osm";
|
||||
LAUTI_OSM_TILE_SERVER = "https://tile.openstreetmap.org/{z}/{x}/{y}.png";
|
||||
LAUTI_TIMEZONE = "Europe/Berlin";
|
||||
LAUTI_LANGUAGE = "en";
|
||||
};
|
||||
secrets = [ /etc/lauti-secrets ];
|
||||
};
|
||||
nginx = {
|
||||
virtualHosts = {
|
||||
${"freising.space"} = {
|
||||
enableACME = true;
|
||||
forceSSL = true;
|
||||
locations."/" = {
|
||||
proxyPass = "http://127.0.0.1:3333";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue