mirror of
https://github.com/Ahwxorg/nixos-config.git
synced 2025-12-04 15:00:13 +01:00
feat: adds guacamole module
This commit is contained in:
parent
2cadf14cd6
commit
dc350e1bd1
2 changed files with 43 additions and 0 deletions
8
modules/services/guacamole-user-mapping.xml
Normal file
8
modules/services/guacamole-user-mapping.xml
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
<user-mapping>
|
||||
<authorize username="marty" password="dingoVncTest">
|
||||
<protocol>vnc</protocol>
|
||||
<param name="hostname">localhost</param>
|
||||
<param name="port">5901</param>
|
||||
<param name="password">dingoVncTest</param>
|
||||
</authorize>
|
||||
</user-mapping>
|
||||
35
modules/services/guacamole.nix
Normal file
35
modules/services/guacamole.nix
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
{ config, ... }:
|
||||
{
|
||||
services = {
|
||||
guacamole-server = {
|
||||
enable = true;
|
||||
host = "127.0.0.1";
|
||||
port = 4822;
|
||||
userMappingXml = ./guacamole-user-mapping.xml;
|
||||
};
|
||||
guacamole-client = {
|
||||
enable = true;
|
||||
enableWebserver = true;
|
||||
settings = {
|
||||
guacd-port = 4822;
|
||||
guacd-hostname = "localhost";
|
||||
};
|
||||
};
|
||||
anubis.instances.guacamole = {
|
||||
settings = {
|
||||
TARGET = "http://localhost:4822";
|
||||
BIND = ":4883";
|
||||
BIND_NETWORK = "tcp";
|
||||
};
|
||||
};
|
||||
nginx.virtualHosts."remote.liv.town" = {
|
||||
forceSSL = true;
|
||||
sslCertificate = "/var/lib/acme/liv.town/cert.pem";
|
||||
sslCertificateKey = "/var/lib/acme/liv.town/key.pem";
|
||||
locations."/" = {
|
||||
proxyPass = "http://localhost${toString config.services.anubis.instances.guacamole.settings.BIND}";
|
||||
proxyWebsockets = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue