minor fixes

This commit is contained in:
kenji
2025-07-23 12:46:36 -05:00
parent 9a24848f21
commit 5f6dbaac10
2 changed files with 36 additions and 4 deletions
+2
View File
@@ -1,4 +1,6 @@
{ {
imports = [ imports = [
../../packages/moondeck-buddy/appimage.nix
../../packages/sunshine/default.nix
]; ];
} }
+34 -4
View File
@@ -17,7 +17,8 @@
extraPkgs = pkgs: extraPkgs = pkgs:
with pkgs; [ with pkgs; [
# Your extraPkgs here steam
libappindicator-gtk3
]; ];
desktopItems = [ desktopItems = [
@@ -51,7 +52,36 @@ in {
59999 # Allow Moondeck Buddy to listen on this port 59999 # Allow Moondeck Buddy to listen on this port
]; ];
# If Moondeck Buddy also needs UDP, uncomment and add it here: # If Moondeck Buddy also needs UDP, uncomment and add it here:
# networking.firewall.allowedUDPPorts = [ networking.firewall.allowedUDPPorts = [
# 59999 59999
# ]; ];
systemd.services.moondeck-buddy = {
description = "Moondeck Buddy service for Sunshine/Moonlight integration";
after = ["network-online.target" "display-manager.service"]; # Ensure display manager is up
wantedBy = ["multi-user.target"]; # Still autostart with multi-user target
serviceConfig = {
Type = "simple";
User = "kenji"; # <--- IMPORTANT: User *must* have access to the display
Group = "users";
ExecStart = "${moondeckBuddyWrapped}/bin/moondeck-buddy";
Restart = "on-failure";
RestartSec = 5;
# Crucial for GUI applications running as system services:
Environment = [
"DISPLAY=:0" # Assuming your main display is :0. This can vary.
# "XAUTHORITY=/home/your-username/.Xauthority" # Needed if using Xauthority
# If using Wayland, you might need XDG_RUNTIME_DIR and WAYLAND_DISPLAY
# "XDG_RUNTIME_DIR=/run/user/$(id -u your-username)"
# "WAYLAND_DISPLAY=wayland-0" # Or specific to your compositor
];
# You might also need to explicitly grant access, e.g., with xhost +
# but that's a security hole. Best is to rely on user authentication.
};
};
} }