summaryrefslogtreecommitdiff
path: root/hosts/phosphophyllite
diff options
context:
space:
mode:
Diffstat (limited to 'hosts/phosphophyllite')
-rw-r--r--hosts/phosphophyllite/default.nix25
1 files changed, 22 insertions, 3 deletions
diff --git a/hosts/phosphophyllite/default.nix b/hosts/phosphophyllite/default.nix
index 1d19015..b7acc31 100644
--- a/hosts/phosphophyllite/default.nix
+++ b/hosts/phosphophyllite/default.nix
@@ -26,15 +26,18 @@
capSysAdmin = true;
settings = {
sunshine_name = "phosphophyllite";
- output_name = "DP-2";
- capture = "kms";
+ output_name = 1;
+ capture = "wlr";
encoder = "software";
hevc_mode = 1;
av1_mode = 1;
packetsize = 1200;
min_log_level = "debug";
origin_web_ui_allowed = "lan";
- global_prep_cmd = ''[{"do":"${pkgs.sudo}/bin/sudo ${pkgs.systemd}/bin/systemctl stop sunshine-poweroff.timer","undo":"${pkgs.sudo}/bin/sudo ${pkgs.systemd}/bin/systemctl start sunshine-poweroff.timer"}]'';
+ global_prep_cmd = ''[
+ {"do":"/run/wrappers/bin/sudo ${pkgs.systemd}/bin/systemctl stop sunshine-poweroff.timer","undo":"/run/wrappers/bin/sudo ${pkgs.systemd}/bin/systemctl start sunshine-poweroff.timer"},
+ {"do":"${pkgs.systemd}/bin/systemctl --user start sunshine-monitor-prep.service","undo":"${pkgs.systemd}/bin/systemctl --user start sunshine-monitor-restore.service"}
+ ]'';
};
};
@@ -54,6 +57,22 @@
}
];
+ systemd.user.services.sunshine-monitor-prep = {
+ description = "Disable vertical monitor for Sunshine sessions";
+ serviceConfig = {
+ Type = "oneshot";
+ ExecStart = "${pkgs.bash}/bin/bash -lc '/run/current-system/sw/bin/hyprctl keyword monitor HDMI-A-1,disable || true'";
+ };
+ };
+
+ systemd.user.services.sunshine-monitor-restore = {
+ description = "Restore vertical monitor after Sunshine sessions";
+ serviceConfig = {
+ Type = "oneshot";
+ ExecStart = "${pkgs.bash}/bin/bash -lc '/run/current-system/sw/bin/hyprctl keyword monitor HDMI-A-1,1920x1080@60,2560x0,1,transform,3 || true'";
+ };
+ };
+
systemd.timers.sunshine-poweroff = {
description = "Shutdown desktop 15 minutes after Sunshine disconnect";
timerConfig = {