minor fixes
This commit is contained in:
@@ -1,4 +1,6 @@
|
|||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
|
../../packages/moondeck-buddy/appimage.nix
|
||||||
|
../../packages/sunshine/default.nix
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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.
|
||||||
|
};
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user