From 435787f44039e30ca6706264e682c9cda47d73ab Mon Sep 17 00:00:00 2001 From: Jan-Bulthuis Date: Fri, 18 Apr 2025 15:12:08 +0200 Subject: [PATCH] Added a carla service --- machines/vm-audio.nix | 29 +++++++++++++++++------------ 1 file changed, 17 insertions(+), 12 deletions(-) diff --git a/machines/vm-audio.nix b/machines/vm-audio.nix index 8cb8da0..fb0f83b 100644 --- a/machines/vm-audio.nix +++ b/machines/vm-audio.nix @@ -88,20 +88,25 @@ }; }; - # Dedicate more memory to network interfaces - boot.kernel.sysctl = { - "net.core.rmem_default" = 1048576; - "net.core.rmem_max" = 16777216; - "net.core.wmem_default" = 1048576; - "net.core.wmem_max" = 16777216; - "net.core.optmem_max" = 65536; - "net.ipv4.tcp_rmem" = "4096 1048576 2097152"; - "net.ipv4.tpc_wmem" = "4096 65536 16777216"; - "net.ipv4.udp_rmem_min" = 8192; - "net.ipv4.udp_wmem_min" = 8192; + # Carla service + systemd.user.services.carla = { + description = "Carla Service"; + wantedBy = [ "default.target" ]; + after = [ + "network.target" + "sound.target" + ]; + unitConfig = { + ConditionUser = "mixer"; + }; + serviceConfig = { + ExecStart = "${pkgs.carla}/bin/carla -n"; + Restart = "always"; + RestartSec = 5; + }; }; - # Create null sink for spotifyd + # Create null sinks services.pipewire.extraConfig.pipewire."91-null-sinks" = { "context.objects" = [ {