Add muho to ssh

This commit is contained in:
mups 2024-11-28 16:30:10 +00:00
parent d8893f8209
commit a130d322d5
2 changed files with 23 additions and 0 deletions

View file

@ -32,6 +32,7 @@ in {
mods.server.wireguard.enable = true;
mods.server.headscale.enable = false;
mods.server.nginx.enable = true;
# Use the GRUB 2 boot loader.
boot.loader.grub.enable = true;
@ -42,6 +43,7 @@ in {
openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKEio+Y5wBVD1wILaH2R3wV10FvVjiqy/4gGBWHOITTB muon@muon"
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKevYmkH7xvYoquBjnYZ7PJiVqf+GOh9fxAJBN6wZGBB gin4@hi.is"
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILmAOd9VbhyJeibt6Vrb101MNTk5W8+rh94Djv/C+pyu muon@muho"
];
};

View file

@ -0,0 +1,21 @@
{ pkgs, lib, config, ... }: {
options.mods.server.nginx = {
enable = lib.mkEnableOption {
default = false;
description = "enables nginx reverse proxy";
};
};
config = lib.mkIf config.mods.server.nginx.enable {
services.nginx = {
recommendedProxySettings = true;
virtualHosts."*.muon.host" = {
locations."/" = {
proxyPass = "http://100.112.114.27:443";
proxyWebsockets = true; # needed if you need to use WebSocket
extraConfig = "proxy_ssl_server_name on;";
};
};
};
};
}