From d323f2925773e9f0d57da6b3ba069ca4221d6300 Mon Sep 17 00:00:00 2001 From: Bang Lee Date: Tue, 26 Aug 2025 16:52:53 -0700 Subject: [PATCH] nixos/wayvnc: init --- .../manual/release-notes/rl-2511.section.md | 2 ++ nixos/modules/module-list.nix | 1 + nixos/modules/programs/wayland/wayvnc.nix | 25 +++++++++++++++++++ 3 files changed, 28 insertions(+) create mode 100644 nixos/modules/programs/wayland/wayvnc.nix diff --git a/nixos/doc/manual/release-notes/rl-2511.section.md b/nixos/doc/manual/release-notes/rl-2511.section.md index ede6b54dbd7b..e04e2155349f 100644 --- a/nixos/doc/manual/release-notes/rl-2511.section.md +++ b/nixos/doc/manual/release-notes/rl-2511.section.md @@ -25,6 +25,8 @@ - [gtklock](https://github.com/jovanlanik/gtklock), a GTK-based lockscreen for Wayland. Available as [programs.gtklock](#opt-programs.gtklock.enable). - [Chrysalis](https://github.com/keyboardio/Chrysalis), a graphical configurator for Kaleidoscope-powered keyboards. Available as [programs.chrysalis](#opt-programs.chrysalis.enable). +- [wayvnc](https://github.com/any1/wayvnc), VNC server for wlroots based Wayland compositors. Available as [programs.wayvnc](#opt-programs.wayvnc.enable). + - [Pi-hole](https://pi-hole.net/), a DNS sinkhole for advertisements based on Dnsmasq. Available as [services.pihole-ftl](#opt-services.pihole-ftl.enable), and [services.pihole-web](#opt-services.pihole-web.enable) for the web GUI and API. - [Fediwall](https://fediwall.social), a web application for live displaying toots from mastodon, inspired by mastowall. Available as [services.fediwall](#opt-services.fediwall.enable). diff --git a/nixos/modules/module-list.nix b/nixos/modules/module-list.nix index b4d2ebc3c7ae..0501ba817229 100644 --- a/nixos/modules/module-list.nix +++ b/nixos/modules/module-list.nix @@ -350,6 +350,7 @@ ./programs/wayland/uwsm.nix ./programs/wayland/waybar.nix ./programs/wayland/wayfire.nix + ./programs/wayland/wayvnc.nix ./programs/weylus.nix ./programs/winbox.nix ./programs/wireshark.nix diff --git a/nixos/modules/programs/wayland/wayvnc.nix b/nixos/modules/programs/wayland/wayvnc.nix new file mode 100644 index 000000000000..0a19541c098d --- /dev/null +++ b/nixos/modules/programs/wayland/wayvnc.nix @@ -0,0 +1,25 @@ +{ + lib, + pkgs, + config, + ... +}: + +let + cfg = config.programs.wayvnc; +in +{ + options.programs.wayvnc = { + enable = lib.mkEnableOption "wayvnc, VNC server for wlroots based Wayland compositors"; + package = lib.mkPackageOption pkgs "wayvnc" { }; + }; + + config = lib.mkIf cfg.enable { + environment.systemPackages = [ cfg.package ]; + + # https://github.com/any1/wayvnc/blob/master/src/pam_auth.c + security.pam.services.wayvnc = { }; + }; + + meta.maintainers = with lib.maintainers; [ qusic ]; +}