nix-config/hosts/matemat/default.nix

61 lines
1.2 KiB
Nix

{ config, lib, libC, pkgs, ... }:
{
c3d2.deployment.server = "server10";
microvm.mem = 2 * 1024;
networking.hostName = "matemat";
services = {
nginx = {
enable = true;
virtualHosts."matemat.hq.c3d2.de" = {
default = true;
forceSSL = true;
enableACME = true;
locations."/" = {
proxyPass = "http://localhost:3000";
extraConfig = libC.hqNetworkOnly;
};
};
};
postgresql = {
package = pkgs.postgresql_15;
upgrade.stopServices = [ "yammat" ];
};
yammat = {
enable = true;
config = lib.mkOptionDefault ''
copyright_link: "https://gitea.c3d2.de/c3d2/yammat"
'';
};
};
programs.msmtp = {
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";
};
};
sops = {
defaultSopsFile = ./secrets.yaml;
secrets = {
"nginx/basic-auth".owner = "nginx";
"restic/password".owner = "root";
"restic/repository/server8".owner = "root";
};
};
system.stateVersion = "22.05";
}