This commit is contained in:
zastian-dev
2026-01-26 12:39:38 +00:00
parent 981b0596fd
commit bbb5ab0b70
2 changed files with 33 additions and 61 deletions

View File

@@ -14,7 +14,7 @@
programs.dank-material-shell = { programs.dank-material-shell = {
enable = true; enable = true;
systemd = { systemd = {
enable = true; # if you prefer starting from your compositor enable = true;
}; };
#settings = { #settings = {

View File

@@ -109,37 +109,37 @@ in
services.flatpak.enable = true; services.flatpak.enable = true;
# Sunshine (only on PC) # Sunshine (only on PC)
services.sunshine = lib.mkIf isPc { #services.sunshine = lib.mkIf isPc {
enable = false; # enable = false;
settings = { # settings = {
sunshine_name = "nixos"; # sunshine_name = "nixos";
port = 47989; # port = 47989;
output_name = 0; # output_name = 0;
}; # };
applications = { # applications = {
apps = [ # apps = [
{ # {
name = "Steam"; # name = "Steam";
env = { # env = {
PATH = "$(PATH):/run/current-system/sw/bin"; # PATH = "$(PATH):/run/current-system/sw/bin";
}; # };
output = "steam.txt"; # output = "steam.txt";
detached = [ # detached = [
"setsid /run/current-system/sw/bin/steam steam://open/bigpicture" # "setsid /run/current-system/sw/bin/steam steam://open/bigpicture"
]; # ];
prep-cmd = [ # prep-cmd = [
{ # {
"do" = ""; # "do" = "";
"undo" = "setsid /run/current-system/sw/bin/steam steam://close/bigpicture"; # "undo" = "setsid /run/current-system/sw/bin/steam steam://close/bigpicture";
} # }
]; # ];
image-path = "steam.png"; # image-path = "steam.png";
} # }
]; # ];
}; # };
capSysAdmin = false; # capSysAdmin = false;
openFirewall = true; # openFirewall = true;
}; #};
# Ollama (only on PC) # Ollama (only on PC)
services.ollama = lib.mkIf isPc { services.ollama = lib.mkIf isPc {
@@ -158,35 +158,7 @@ in
}; };
}; };
# ─── Systemd User Services ──────────────────────────────────────────────────
systemd.user.services.steam-run-url-service = {
description = "Service to launch Steam URLs via FIFO";
wantedBy = [ "default.target" ];
serviceConfig = {
ExecStart =
let
script = pkgs.writeShellScript "steam-run-url-service.sh" ''
#!/usr/bin/env bash
FIFO="/run/user/$(id --user)/steam-run-url.fifo"
if [ ! -p "$FIFO" ]; then
mkfifo "$FIFO"
fi
while true; do
if read line <"$FIFO"; then
steam_env=();
if [ "$XDG_SESSION_DESKTOP" = "sway" ] || [ "$XDG_SESSION_DESKTOP" = "Hyprland" ] || [ "$DESKTOP_SESSION" = "sway" ] || [ "$DESKTOP_SESSION" = "Hyprland" ]; then
steam_env+=("QT_QPA_PLATFORM=wayland");
fi
steam "$line"
fi
done
'';
in
"${script}";
Restart = "always";
};
path = [ pkgs.steam ];
};
# ─── Networking & Remote ──────────────────────────────────────────────────── # ─── Networking & Remote ────────────────────────────────────────────────────
# services.resolved = { # services.resolved = {