Added xpra setup

This commit is contained in:
Jan-Bulthuis 2025-04-18 17:34:36 +02:00
parent a6190e3bb2
commit 755ce711fe
1 changed files with 29 additions and 3 deletions

View File

@ -41,8 +41,14 @@
# Setup firewall # Setup firewall
networking.firewall = { networking.firewall = {
allowedTCPPorts = [ 22752 ]; allowedTCPPorts = [
allowedUDPPorts = [ 22752 ]; 22752
15151
];
allowedUDPPorts = [
22752
15151
];
}; };
# Setup dependencies # Setup dependencies
@ -95,6 +101,23 @@
}; };
}; };
# Xpra service
systemd.user.services.xpra = {
description = "Xpra Service";
wantedBy = [ "default.target" ];
after = [
"network.target"
];
unitConfig = {
ConditionUser = "mixer";
};
serviceConfig = {
ExecStart = "${pkgs.xpra}/bin/xpra start :7 --bind-tcp=0.0.0.0:15151 --daemon=no";
Restart = "always";
RestartSec = 5;
};
};
# Carla service # Carla service
systemd.user.services.carla = { systemd.user.services.carla = {
description = "Carla Service"; description = "Carla Service";
@ -103,11 +126,14 @@
"network.target" "network.target"
"sound.target" "sound.target"
]; ];
requires = [
"xpra.service"
];
unitConfig = { unitConfig = {
ConditionUser = "mixer"; ConditionUser = "mixer";
}; };
serviceConfig = { serviceConfig = {
ExecStart = "${pkgs.carla}/bin/carla -n /home/mixer/Default.carxp"; ExecStart = "DISPLAY=:7 ${pkgs.carla}/bin/carla -platform xcb /home/mixer/Default.carxp";
Restart = "always"; Restart = "always";
RestartSec = 5; RestartSec = 5;
}; };