diff --git a/system-config/configuration/homebox/default.nix b/system-config/configuration/homebox/default.nix index 1b88e9f..9c8825a 100644 --- a/system-config/configuration/homebox/default.nix +++ b/system-config/configuration/homebox/default.nix @@ -102,6 +102,10 @@ 8080 8123 ]; + firewall.interfaces."ve-novnc" = { + allowedTCPPorts = [ 5900 ]; + allowedUDPPorts = [ 5900 ]; + }; hosts = { "192.168.100.11" = [ "blunkall.us" "*.blunkall.us" ]; "192.168.100.20" = [ "gitea.blunkall.us" ]; @@ -273,6 +277,7 @@ rustdesk.enable = false; #broken pihole.enable = false; #broken code-server.enable = false; + novnc.enable = true; }; }; }; diff --git a/system-config/services/containers/default.nix b/system-config/services/containers/default.nix index 0db268c..a37a7c8 100644 --- a/system-config/services/containers/default.nix +++ b/system-config/services/containers/default.nix @@ -17,5 +17,6 @@ ./n8n ./wyoming ./code-server + ./vnc ]; } diff --git a/system-config/services/containers/novnc/default.nix b/system-config/services/containers/novnc/default.nix new file mode 100644 index 0000000..a42079a --- /dev/null +++ b/system-config/services/containers/novnc/default.nix @@ -0,0 +1,34 @@ +{ config, lib, ... }: { + + options.sysconfig.opts.virtualization.novnc.enable = lib.mkOption { + type = lib.types.bool; + default = false; + }; + + config = lib.mkIf config.sysconfig.opts.virtualization.novnc.enable { + + containers.novnc = { + + autoStart = true; + privateNetwork = true; + hostAddress = "192.168.100.10"; + localAddress = "192.168.100.30"; + + config = { + + systemd.services.novnc = { + enable = true; + + script = '' + novnc --listen 80 --vnc 192.168.100.10:5900 + ''; + }; + + + networking.firewall.allowedTCPPorts = [ 80 ]; + + system.stateVersion = "25.05"; + }; + }; + }; +}