greetd: Only open firewall for wayvnc when tailscale is not enabled

This commit is contained in:
Erwin Boskma 2023-10-10 09:56:06 +02:00
parent 7e86becbb2
commit 9c99926c8a
Signed by: erwin
SSH key fingerprint: SHA256:9LmFDe1C6jSrEyqxxvX8NtJBmcbB105XoqyUZF092bg

View file

@ -77,14 +77,14 @@ in
# exec "${pkgs.greetd.regreet}/bin/regreet; swaymsg exit"
networking.firewall.allowedTCPPorts = lib.mkIf cfg.wayvnc [ 5900 ];
networking.firewall.allowedTCPPorts = lib.mkIf (cfg.wayvnc && !config.services.tailscale.enable) [ 5900 ];
environment = {
systemPackages = with pkgs; [ pantheon.elementary-gtk-theme pantheon.elementary-icon-theme ];
etc = {
"greetd/sway-config" = {
text = lib.concatStringsSep "\n"
((lib.optional cfg.wayvnc "exec ${pkgs.wayvnc}/bin/wayvnc -g 0.0.0.0") ++
((lib.optional cfg.wayvnc "exec ${pkgs.wayvnc}/bin/wayvnc 0.0.0.0") ++
[
''
exec "${pkgs.greetd.gtkgreet}/bin/gtkgreet -l -s /etc/greetd/gtkgreet.css -b ${cfg.wallpaper}; swaymsg exit"