Files
nix-config/modules/nixos/desktop/networking/remote-desktop.nix
T
Ryan Yin 662316c18a Nixos 26.05 (#261)
* flake.lock: Update

Flake lock file updates:

• Updated input 'nixpkgs':
    'github:NixOS/nixpkgs/7aaa00e7cc9be6c316cb5f6617bd740dd435c59d?narHash=sha256-WacE23EbHTsBKvr8cu%2B1DFNbP6Rh1brHUH5SDUI0NQI%3D' (2026-04-30)
  → 'github:NixOS/nixpkgs/e9a7635a57597d9754eccebdfc7045e6c8600e6b?narHash=sha256-u6WU/yd/o8iYQrHX3RAwO1hYa3LkoSL%2BWNQD0rJfJZQ%3D' (2026-05-29)

* feat: upgrade to nixos 26.05
2026-06-01 10:02:49 +08:00

43 lines
1.5 KiB
Nix

{ lib, pkgs, ... }:
{
environment.systemPackages = with pkgs; [
moonlight-qt # moonlight client, for streaming games/desktop from a PC
];
# ===============================================================================
#
# Sunshine: A self-hosted game stream server for Moonlight(Client).
# It's designed for game streaming, but it can be used for remote desktop as well.
#
# How to use:
# 1. setup user via Web Console: <https://localhost:47990/>):
# 2. on another machine, connect to sunshine on via moonlight-qt client
#
# Docs:
# https://docs.lizardbyte.dev/projects/sunshine/latest/index.html
#
# Check Service Status
# systemctl --user status sunshine
# Check logs
# journalctl --user -u sunshine --since "2 minutes ago"
#
# References:
# https://github.com/NixOS/nixpkgs/blob/nixos-26.05/nixos/modules/services/networking/sunshine.nix
#
# ===============================================================================
services.sunshine = {
enable = lib.mkDefault false; # default to false, for security reasons.
autoStart = true;
capSysAdmin = true; # only needed for Wayland -- omit this when using with Xorg
openFirewall = true;
settings = {
# pc - Only localhost may access the web ui
# lan - Only LAN devices may access the web ui
origin_web_ui_allowed = "pc";
# 2 - encryption is mandatory and unencrypted connections are rejected
lan_encryption_mode = 2;
wan_encryption_mode = 2;
};
};
}