nix-config/hosts/matemat/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

64 lines
1.3 KiB
Nix
Raw Normal View History

{ config, lib, libC, pkgs, ... }:
2022-06-17 21:27:38 +02:00
{
c3d2.deployment.server = "server10";
2022-06-19 11:32:48 +02:00
microvm.mem = 2 * 1024;
2022-06-18 21:29:09 +02:00
networking.hostName = "matemat";
2021-03-06 01:13:27 +01:00
2022-06-17 21:27:38 +02:00
services = {
nginx = {
enable = true;
virtualHosts."matemat.hq.c3d2.de" = {
default = true;
forceSSL = true;
enableACME = true;
locations."/" = {
proxyPass = "http://localhost:3000";
2023-07-05 23:28:37 +02:00
extraConfig = libC.hqNetworkOnly + ''
auth_basic secured;
auth_basic_user_file ${config.sops.secrets."nginx/basic-auth".path};
'';
2022-06-17 21:27:38 +02:00
};
2021-03-06 02:28:46 +01:00
};
2021-03-06 01:13:27 +01:00
};
2023-01-07 02:00:15 +01:00
2023-02-12 19:52:55 +01:00
postgresql = {
package = pkgs.postgresql_15;
upgrade.stopServices = [ "yammat" ];
};
2023-01-07 02:00:15 +01:00
2023-02-12 19:52:55 +01:00
yammat = {
enable = true;
config = lib.mkOptionDefault ''
copyright_link: "https://gitea.c3d2.de/c3d2/yammat"
'';
};
2021-03-06 01:13:27 +01:00
};
2021-03-06 20:59:08 +01:00
programs.msmtp = {
2021-03-06 20:59:08 +01:00
enable = true;
accounts.default = {
host = "mail.c3d2.de";
port = 587;
tls = true;
tls_starttls = true;
auth = false;
domain = "matemat.hq.c3d2.de";
from = "nek0@c3d2.de";
};
2021-03-06 20:59:08 +01:00
};
2022-12-26 23:18:02 +01:00
sops = {
defaultSopsFile = ./secrets.yaml;
secrets = {
"nginx/basic-auth".owner = "nginx";
2023-05-18 01:55:16 +02:00
"restic/password".owner = "root";
2023-08-09 00:36:09 +02:00
"restic/repositories/server8".owner = "root";
};
2022-12-26 23:18:02 +01:00
};
system.stateVersion = "22.05";
}