summary refs log tree commit diff
diff options
context:
space:
mode:
authorMel <mel@rnrd.eu>2026-04-05 19:48:36 +0200
committerMel <mel@rnrd.eu>2026-04-05 19:48:36 +0200
commita6479e4d5f77a8e69feb92eec89c1ac692586c31 (patch)
treecc80840f935c4863215d29c8fe14f0a9db6c415e
parent5f812b86a7b8b09bb146112ed7c7f35acd0ad6b4 (diff)
downloadminerals-a6479e4d5f77a8e69feb92eec89c1ac692586c31.tar.zst
minerals-a6479e4d5f77a8e69feb92eec89c1ac692586c31.zip
Add Sunshine streaming to Bismuth
Signed-off-by: Mel <mel@rnrd.eu>
-rw-r--r--machines/bismuth/default.nix3
-rw-r--r--modules/sunshine.nix32
2 files changed, 26 insertions, 9 deletions
diff --git a/machines/bismuth/default.nix b/machines/bismuth/default.nix
index a70d93c..2bd6f72 100644
--- a/machines/bismuth/default.nix
+++ b/machines/bismuth/default.nix
@@ -5,8 +5,9 @@
     ./hardware.nix
     ./devices.nix
 
-    ../../modules/binary-cache.nix
     ../../modules/hardware/amd-gpu.nix
+    ../../modules/binary-cache.nix
+    ../../modules/sunshine.nix
   ];
 
   # expose vm web interface to tailnet
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 = {