nixos/sunshine: add autoStart attr

Changed files
+8 -1
nixos
modules
services
networking
+8 -1
nixos/modules/services/networking/sunshine.nix
···
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 = ''
···
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" ];