mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-09-29 15:43:00 +00:00
Merge pull request #306761 from Cryolitia/sunshine
nixos/sunshine: add autoStart attr
This commit is contained in:
commit
c1c2a084c7
@ -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 = ''
|
||||
@ -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" ];
|
||||
|
Loading…
Reference in New Issue
Block a user