Setup VNC server on pianonix

This commit is contained in:
2024-12-01 18:09:56 +01:00
parent 4266574fa6
commit b0acc7178d
4 changed files with 59 additions and 8 deletions

View File

@ -66,6 +66,20 @@
user = "julian";
};
systemd.services.x11vnc = {
description = "Run x11vnc server";
after = [ "display-manager.service" ];
wantedBy = [ "multi-user.target" ];
serviceConfig = {
ExecStart = "${pkgs.x11vnc}/bin/x11vnc -rfbauth ${
config.sops.secrets."vnc-passwd".path
} -forever -loop -noxdamage -repeat -rfbport 5900 -shared";
User = config.users.users.julian.name;
Restart = "on-failure";
Environment = "DISPLAY=:0";
};
};
boot.loader.timeout = 1; # Set boot loader timeout to 1s
programs.dconf.enable = true;
@ -134,15 +148,11 @@
mc
];
# VNC server
# services.x2goserver.enable = true;
networking.firewall.enable = true;
# networking.firewall.enable = false;
# networking.firewall.allowedTCPPorts = [
# 8000
# 5901
# ];
networking.firewall.allowedTCPPorts = [
5900 # for vnc
];
# Disable the GNOME3/GDM auto-suspend feature that cannot be disabled in GUI!
# If no user is logged in, the machine will power down after 20 minutes.