2023-10-02 17:14:20 +02:00
|
|
|
{...}: {
|
2023-09-10 14:12:01 +02:00
|
|
|
imports = [
|
2023-09-24 10:15:53 +02:00
|
|
|
(import ./modules {
|
|
|
|
hostName = "hetzner-vpn1";
|
2023-09-24 10:46:15 +02:00
|
|
|
enableHomeManager = false;
|
2023-09-24 10:15:53 +02:00
|
|
|
})
|
2023-09-10 14:12:01 +02:00
|
|
|
];
|
|
|
|
|
|
|
|
config = {
|
2023-09-24 14:59:21 +02:00
|
|
|
my = {
|
|
|
|
enabledUsers = [];
|
2023-12-04 22:45:50 +01:00
|
|
|
tailscale.enable = true;
|
2023-09-24 14:59:21 +02:00
|
|
|
};
|
2023-09-11 19:16:26 +02:00
|
|
|
|
2023-09-10 14:12:01 +02:00
|
|
|
users.users.root.openssh.authorizedKeys.keys = [
|
|
|
|
''ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAICdYqY3Y1/f1bsAi5Qfyr/UWuX9ixu96IeAlhoQaJkbf''
|
2023-12-05 14:50:19 +01:00
|
|
|
''ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFCJUpbpB3KEKVoKWsKoar9J4RNah8gmQoSH6jQEw5dY vinzenz-pixel-JuiceSSH''
|
2023-12-05 15:00:02 +01:00
|
|
|
''ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIO1CRn4yYTL4XUdCebE8Z4ZeuMujBjorTdWifg911EOv vinzenz-pc2 home roaming''
|
2024-03-01 17:39:37 +01:00
|
|
|
''ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPDNpLDmctyqGpow/ElQvdhY4BLBPS/sigDJ1QEcC7wC vinzenz-lpt2-roaming''
|
2023-09-10 14:12:01 +02:00
|
|
|
];
|
2024-03-02 12:09:21 +01:00
|
|
|
|
|
|
|
security.acme = {
|
|
|
|
acceptTerms = true;
|
|
|
|
defaults.email = "acme@zerforschen.plus";
|
|
|
|
};
|
|
|
|
|
2024-03-02 13:18:05 +01:00
|
|
|
security.pam.services.nginx.setEnvironment = false;
|
|
|
|
systemd.services.nginx.serviceConfig = {
|
|
|
|
SupplementaryGroups = ["shadow"];
|
|
|
|
};
|
|
|
|
|
2024-03-02 12:09:21 +01:00
|
|
|
services.nginx = {
|
|
|
|
enable = true;
|
2024-03-02 13:18:05 +01:00
|
|
|
additionalModules = [pkgs.nginxModules.pam];
|
|
|
|
|
2024-03-02 12:09:21 +01:00
|
|
|
recommendedProxySettings = true;
|
|
|
|
recommendedTlsSettings = true;
|
|
|
|
recommendedGzipSettings = true;
|
|
|
|
recommendedOptimisation = true;
|
|
|
|
|
|
|
|
virtualHosts = {
|
|
|
|
"vscode.services.zerforschen.plus" = {
|
|
|
|
addSSL = true;
|
|
|
|
enableACME = true;
|
|
|
|
locations."/" = {
|
|
|
|
extraConfig = ''
|
2024-03-02 13:18:05 +01:00
|
|
|
# bind to tailscale ip
|
2024-03-02 13:05:41 +01:00
|
|
|
proxy_bind 100.88.118.60;
|
2024-03-02 13:18:05 +01:00
|
|
|
auth_pam "Password Required";
|
|
|
|
auth_pam_service_name "nginx";
|
2024-03-02 12:09:21 +01:00
|
|
|
'';
|
2024-03-02 13:18:05 +01:00
|
|
|
proxyPass = "http://vinzenz-lpt2:8542/"; #tailscale magic dns
|
2024-03-02 12:09:21 +01:00
|
|
|
proxyWebsockets = true;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
"preon-app.services.zerforschen.plus" = {
|
|
|
|
enableACME = true;
|
|
|
|
addSSL = true;
|
|
|
|
locations."/" = {
|
|
|
|
proxyPass = "http://127.0.0.1:3000/";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
"preon-api.services.zerforschen.plus" = {
|
|
|
|
enableACME = true;
|
|
|
|
addSSL = true;
|
|
|
|
locations."/" = {
|
|
|
|
proxyPass = "http://127.0.0.1:3002/";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2024-03-02 13:02:14 +01:00
|
|
|
networking.firewall.allowedTCPPorts = [80 443];
|
2023-09-10 14:12:01 +02:00
|
|
|
};
|
|
|
|
}
|