Add host bekkalokk
`bekkalokk` is a new machine, meant to host web services and eventually miscellaneous services.
This commit is contained in:
26
hosts/bekkalokk/services/website/gitea.nix
Normal file
26
hosts/bekkalokk/services/website/gitea.nix
Normal file
@@ -0,0 +1,26 @@
|
||||
{ config, values, ... }:
|
||||
{
|
||||
sops.secrets."postgres/gitea/password" = { };
|
||||
|
||||
services.gitea = {
|
||||
enable = true;
|
||||
rootUrl = "https://git2.pvv.ntnu.no/";
|
||||
stateDir = "/data/gitea";
|
||||
appName = "PVV Git";
|
||||
|
||||
enableUnixSocket = true;
|
||||
|
||||
database = {
|
||||
type = "postgres";
|
||||
host = values.bicep.ipv4;
|
||||
port = config.services.postgresql.port;
|
||||
passwordFile = config.sops.secrets."postgres/gitea/password".path;
|
||||
createDatabase = false;
|
||||
};
|
||||
|
||||
settings = {
|
||||
service.DISABLE_REGISTRATION = true;
|
||||
session.COOKIE_SECURE = true;
|
||||
};
|
||||
};
|
||||
}
|
23
hosts/bekkalokk/services/website/mediawiki.nix
Normal file
23
hosts/bekkalokk/services/website/mediawiki.nix
Normal file
@@ -0,0 +1,23 @@
|
||||
{ values, config, ... }:
|
||||
{
|
||||
sops.secrets = {
|
||||
"mediawiki/password" = { };
|
||||
"postgres/mediawiki/password" = { };
|
||||
};
|
||||
|
||||
services.mediawiki = {
|
||||
enable = true;
|
||||
name = "PVV";
|
||||
passwordFile = config.sops.secrets."mediawiki/password".path;
|
||||
|
||||
virtualHost = {
|
||||
};
|
||||
|
||||
database = {
|
||||
type = "postgres";
|
||||
host = values.bicep.ipv4;
|
||||
port = config.services.postgresql.port;
|
||||
passwordFile = config.sops.secrets."postgres/mediawiki/password".path;
|
||||
};
|
||||
};
|
||||
}
|
30
hosts/bekkalokk/services/website/nginx.nix
Normal file
30
hosts/bekkalokk/services/website/nginx.nix
Normal file
@@ -0,0 +1,30 @@
|
||||
{ config, ... }:
|
||||
{
|
||||
services.nginx = {
|
||||
enable = true;
|
||||
|
||||
recommendedTlsSettings = true;
|
||||
recommendedProxySettings = true;
|
||||
recommendedOptimisation = true;
|
||||
recommendedGzipSettings = true;
|
||||
|
||||
virtualHosts = {
|
||||
"www.pvv.ntnu.no" = {
|
||||
forceSSL = true;
|
||||
|
||||
locations = {
|
||||
"/pvv" = {
|
||||
proxyPass = "http://localhost:${config.services.mediawiki.virtualHost.listen.pvv.port}";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
"git.pvv.ntnu.no" = {
|
||||
locations."/" = {
|
||||
proxyPass = "http://unix:${config.services.gitea.settings.server.HTTP_ADDR}";
|
||||
proxyWebsockets = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
4
hosts/bekkalokk/services/website/website.nix
Normal file
4
hosts/bekkalokk/services/website/website.nix
Normal file
@@ -0,0 +1,4 @@
|
||||
{ ... }:
|
||||
{
|
||||
|
||||
}
|
Reference in New Issue
Block a user