about summary refs log tree commit diff
path: root/nixos
diff options
context:
space:
mode:
authorAleksana <me@aleksana.moe>2024-04-26 16:49:15 +0800
committerGitHub <noreply@github.com>2024-04-26 16:49:15 +0800
commitc1c2a084c702d667f90bd0c1126454800cc0a4ae (patch)
tree03949b92c81066afa733cd67e4ce346c34d28b40 /nixos
parent258bbbf949a63743c66776e0562ce50f4528b42e (diff)
parent13e6ece4709970e8f36f2713366ee9902e6ef137 (diff)
Merge pull request #306761 from Cryolitia/sunshine
nixos/sunshine: add autoStart attr
Diffstat (limited to 'nixos')
-rw-r--r--nixos/modules/services/networking/sunshine.nix9
1 files changed, 8 insertions, 1 deletions
diff --git a/nixos/modules/services/networking/sunshine.nix b/nixos/modules/services/networking/sunshine.nix
index c115b9cd5cf99..0749eaee95d8a 100644
--- a/nixos/modules/services/networking/sunshine.nix
+++ b/nixos/modules/services/networking/sunshine.nix
@@ -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" ];