Skip to content

Commit

Permalink
Merge pull request #306761 from Cryolitia/sunshine
Browse files Browse the repository at this point in the history
nixos/sunshine: add autoStart attr
  • Loading branch information
Aleksanaa committed Apr 26, 2024
2 parents 258bbbf + 13e6ece commit c1c2a08
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion nixos/modules/services/networking/sunshine.nix
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,13 @@ in
Whether to give the Sunshine binary CAP_SYS_ADMIN, required for DRM/KMS screen capture.
'';
};
autoStart = mkOption {
type = bool;
default = true;
description = ''
Whether sunshine should be started automatically.
'';
};
settings = mkOption {
default = { };
description = ''
Expand Down Expand Up @@ -135,7 +142,7 @@ in
systemd.user.services.sunshine = {
description = "Self-hosted game stream host for Moonlight";

wantedBy = [ "graphical-session.target" ];
wantedBy = mkIf cfg.autoStart [ "graphical-session.target" ];
partOf = [ "graphical-session.target" ];
wants = [ "graphical-session.target" ];
after = [ "graphical-session.target" ];
Expand Down

0 comments on commit c1c2a08

Please sign in to comment.