summary refs log tree commit diff
path: root/modules/sunshine.nix
diff options
context:
space:
mode:
Diffstat (limited to 'modules/sunshine.nix')
-rw-r--r--modules/sunshine.nix32
1 files changed, 24 insertions, 8 deletions
diff --git a/modules/sunshine.nix b/modules/sunshine.nix
index 28ccff8..6889e02 100644
--- a/modules/sunshine.nix
+++ b/modules/sunshine.nix
@@ -17,6 +17,27 @@ let
   capitalize = str: toUpper (substring 0 1 str) + substring 1 (-1) str;
 
   user = "mel";
+
+  # per machine sunshine settings
+  perMachine = {
+    # wolfram has an arc b570 gpu optimized for transcoding,
+    # and is the primary streaming machine
+    wolfram = {
+      adapter_name = "/dev/dri/renderD128"; # primary card should be located here
+      encoder = "vaapi"; # or "qsv" is quicksync is better supported
+      av1_mode = 2;
+    };
+
+    # bismuth has a radeon rx 9070 xt, and is only
+    # used when streaming from wolfram is impossible,
+    # as it's my personal desktop machine.
+    bismuth = {
+      adapter_name = "/dev/dri/renderD128"; # primary card should be located here
+      encoder = "amdvce";
+      av1_mode = 0;
+      hevc_mode = 2;
+    };
+  };
 in
 {
   services.sunshine = {
@@ -28,19 +49,14 @@ in
     settings = {
       sunshine_name = capitalize me.name;
 
-      # note: these are the settings for wolfram and it's intel arc b570 gpu
-      # in particular, should be adjusted for different setups when used!
-      adapter_name = "/dev/dri/renderD128"; # primary card should be located here
-      encoder = "vaapi"; # or "qsv" is quicksync is better supported
-      av1_mode = 2;
-
       # no need for encryption since we are going through a secure network anyway
       lan_encryption_mode = 0;
       wan_encryption_mode = 0;
       origin_web_ui_allowed = "wan"; # allow access everywhere
 
-      gamepad = "ds5"; # my primary controllers
-    };
+      gamepad = "auto"; # to support ds5 and steam deck controllers
+    }
+    // perMachine.${me.name};
 
     applications = {
       env = {