fix(io): switch audio system to pipewire

This commit is contained in:
514fpv 2024-06-24 18:22:30 +08:00
parent 4c5dc311f5
commit d56b3fe5b1
Signed by: koishi
SSH key fingerprint: SHA256:axz0uIzzY+5W19i7QOUuiw5LSqhKfCBKPf3L4xFRxLw

View file

@ -30,11 +30,15 @@ in {
networking.firewall.logRefusedConnections = true;
hardware.bluetooth.enable = mkDefault cfg.bluetooth;
hardware.pulseaudio = mkIf cfg.audio {
# rtkit is optional but recommended
security.rtkit.enable = cfg.audio;
services.pipewire = mkIf cfg.audio {
enable = true;
support32Bit = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
jack.enable = true;
};
#nixpkgs.config.pulseaudio = mkIf cfg.audio;
security.pam.loginLimits = mkIf (!cfg.coredump) (singleton { domain = "*"; item = "core"; type = "hard"; value = "0"; });
systemd.coredump.extraConfig = mkIf (!cfg.coredump) "Storage=none";
@ -47,5 +51,8 @@ in {
optional cfg.bluetooth "/var/lib/bluetooth" ++
optional cfg.coredump "/var/lib/systemd/coredump";
environment.persistence."/nix/persist/fhs".hideMounts = true;
users.home.persist.directories = [ ] ++
optional cfg.audio ".local/state/wireplumber";
};
}