updates
This commit is contained in:
parent
6198cf14d4
commit
1506941c66
49 changed files with 1963 additions and 1822 deletions
|
|
@ -24,39 +24,9 @@ in {
|
|||
jack.enable = true;
|
||||
};
|
||||
|
||||
systemd.user.services.cava-combine-inputs = {
|
||||
description = "Combine MOTU M4 Line Inputs L/R for Cava";
|
||||
|
||||
# Ensure this runs after pipewire-pulse is started
|
||||
after = ["pipewire-pulse.service"];
|
||||
wants = ["pipewire-pulse.service"]; # Start pipewire-pulse if not already running
|
||||
|
||||
# Make it part of the default user session target
|
||||
wantedBy = ["default.target"];
|
||||
|
||||
# Service configuration details
|
||||
serviceConfig = {
|
||||
Type = "oneshot"; # Run the command once and exit
|
||||
# Use RemainAfterExit if you want the service to show as 'active' after running
|
||||
# RemainAfterExit = true;
|
||||
|
||||
# Command to execute. Use full paths for robustness.
|
||||
# We use sh -c to run multiple commands sequentially.
|
||||
# pactl is provided by the pulseaudio package.
|
||||
ExecStart = "${pkgs.writeShellScriptBin "cava-start" ''
|
||||
echo "Attempting to load Cava combine modules..."
|
||||
# Load null sink (returns non-zero if it fails AND module doesn't exist)
|
||||
${pkgs.pulseaudio}/bin/pactl load-module module-null-sink sink_name=cava-line-in sink_properties=device.description="Cava_Combined_LineIn"
|
||||
# Load loopbacks (returns non-zero on failure)
|
||||
${pkgs.pulseaudio}/bin/pactl load-module module-loopback source="alsa_input.usb-MOTU_M4_M4MA03F7DV-00.HiFi__Line3__source" sink=cava-line-in latency_msec=10
|
||||
${pkgs.pulseaudio}/bin/pactl load-module module-loopback source="alsa_input.usb-MOTU_M4_M4MA03F7DV-00.HiFi__Line4__source" sink=cava-line-in latency_msec=10
|
||||
echo "Finished loading Cava combine modules (ignore errors if already loaded)."
|
||||
# Exit successfully even if modules were already loaded (pactl might return 0)
|
||||
exit 0
|
||||
''}/bin/cava-start";
|
||||
|
||||
# Prevent service from restarting automatically
|
||||
Restart = "no";
|
||||
services.pipewire.extraConfig.pipewire."92-low-latency" = {
|
||||
"context.properties" = {
|
||||
"default.clock.rate" = 192000;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
|
|||
|
|
@ -110,14 +110,6 @@ with lib.custom; let
|
|||
libvirtd-cfg = config.virtualisation.libvirtd;
|
||||
|
||||
qemuConfigFile = pkgs.writeText "qemu.conf" ''
|
||||
${optionalString libvirtd-cfg.qemu.ovmf.enable ''
|
||||
nvram = [
|
||||
"/run/libvirt/nix-ovmf/AAVMF_CODE.fd:/run/libvirt/nix-ovmf/AAVMF_VARS.fd",
|
||||
"/run/libvirt/nix-ovmf/AAVMF_CODE.ms.fd:/run/libvirt/nix-ovmf/AAVMF_VARS.ms.fd",
|
||||
"/run/libvirt/nix-ovmf/OVMF_CODE.fd:/run/libvirt/nix-ovmf/OVMF_VARS.fd",
|
||||
"/run/libvirt/nix-ovmf/OVMF_CODE.ms.fd:/run/libvirt/nix-ovmf/OVMF_VARS.ms.fd"
|
||||
]
|
||||
''}
|
||||
${optionalString (!libvirtd-cfg.qemu.runAsRoot) ''
|
||||
user = "qemu-libvirtd"
|
||||
group = "qemu-libvirtd"
|
||||
|
|
@ -162,16 +154,6 @@ in {
|
|||
package = pkgs.qemu_kvm;
|
||||
runAsRoot = true;
|
||||
swtpm.enable = true;
|
||||
ovmf = {
|
||||
enable = true;
|
||||
packages = [
|
||||
(pkgs.OVMF.override {
|
||||
secureBoot = true;
|
||||
tpmSupport = true;
|
||||
})
|
||||
.fd
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
|
|
@ -217,20 +199,6 @@ in {
|
|||
done
|
||||
|
||||
ln -s --force ${libvirtd-cfg.qemu.package}/bin/qemu-pr-helper /run/${dirName}/nix-helpers/
|
||||
|
||||
${optionalString libvirtd-cfg.qemu.ovmf.enable (
|
||||
let
|
||||
ovmfpackage = pkgs.buildEnv {
|
||||
name = "qemu-ovmf";
|
||||
paths = libvirtd-cfg.qemu.ovmf.packages;
|
||||
};
|
||||
in ''
|
||||
ln -s --force ${ovmfpackage}/FV/AAVMF_CODE{,.ms}.fd /run/${dirName}/nix-ovmf/
|
||||
ln -s --force ${ovmfpackage}/FV/OVMF_CODE{,.ms}.fd /run/${dirName}/nix-ovmf/
|
||||
ln -s --force ${ovmfpackage}/FV/AAVMF_VARS{,.ms}.fd /run/${dirName}/nix-ovmf/
|
||||
ln -s --force ${ovmfpackage}/FV/OVMF_VARS{,.ms}.fd /run/${dirName}/nix-ovmf/
|
||||
''
|
||||
)}
|
||||
'';
|
||||
|
||||
system.activationScripts.libvirt-hooks.text = ''
|
||||
|
|
|
|||
|
|
@ -44,12 +44,12 @@ in {
|
|||
|
||||
# Optionally, you may need to select the appropriate driver version for your specific GPU.
|
||||
package = config.boot.kernelPackages.nvidiaPackages.mkDriver {
|
||||
version = "580.82.07";
|
||||
sha256_64bit = "sha256-Bh5I4R/lUiMglYEdCxzqm3GLolQNYFB0/yJ/zgYoeYw=";
|
||||
sha256_aarch64 = "sha256-or3//aV4TQcPDgcLxFB75H/kB8n+3RzwTO1C2ZbJAJI=";
|
||||
openSha256 = "sha256-8/7ZrcwBMgrBtxebYtCcH5A51u3lAxXTCY00LElZz08=";
|
||||
settingsSha256 = "sha256-lx1WZHsW7eKFXvi03dAML6BoC5glEn63Tuiz3T867nY=";
|
||||
persistencedSha256 = "sha256-1JCk2T3H5NNFQum0gA9cnio31jc0pGvfGIn2KkAz9kA=";
|
||||
version = "580.82.09";
|
||||
sha256_64bit = "sha256-Puz4MtouFeDgmsNMKdLHoDgDGC+QRXh6NVysvltWlbc=";
|
||||
sha256_aarch64 = "sha256-6tHiAci9iDTKqKrDIjObeFdtrlEwjxOHJpHfX4GMEGQ=";
|
||||
openSha256 = "sha256-YB+mQD+oEDIIDa+e8KX1/qOlQvZMNKFrI5z3CoVKUjs=";
|
||||
settingsSha256 = "sha256-um53cr2Xo90VhZM1bM2CH4q9b/1W2YOqUcvXPV6uw2s=";
|
||||
persistencedSha256 = "sha256-lbYSa97aZ+k0CISoSxOMLyyMX//Zg2Raym6BC4COipU=";
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue