main @ 68 LINES
[ HISTORY ] [ UP ]
┌─ NIX ──────────────────────────────────────────────────────────────────────┐
│ { │
│ lib, │
│ config, │
│ ... │
│ }: let │
│ inherit (builtins) elem; │
│ inherit (lib) mkIf; │
│ inherit (config.ooknet.hardware) features; │
│ in { │
│ # generic audio configuration │
│ config = mkIf (elem "audio" features) { │
│ services = { │
│ pipewire = { │
│ enable = true; │
│ audio.enable = true; │
│ alsa = { │
│ enable = true; │
│ support32Bit = true; │
│ }; │
│ pulse.enable = true; │
│ jack.enable = true; │
│ wireplumber = { │
│ enable = true; │
│ # keep BT headphones in A2DP, dont auto-flip to mono HFP when an app gra │
│ bs the mic │
│ extraConfig."51-bluez-no-hfp-switch"."wireplumber.settings"."bluetooth.a │
│ utoswitch-to-headset-profile" = false; │
│ }; │
│ }; │
│ pulseaudio.enable = false; │
│ }; │
│ │
│ security = { │
│ rtkit.enable = true; │
│ pam.loginLimits = [ │
│ { │
│ domain = "@audio"; │
│ item = "nofile"; │
│ type = "soft"; │
│ value = "99999"; │
│ } │
│ { │
│ domain = "@audio"; │
│ item = "nofile"; │
│ type = "hard"; │
│ value = "99999"; │
│ } │
│ { │
│ domain = "@audio"; │
│ item = "rtprio"; │
│ type = "-"; │
│ value = "99"; │
│ } │
│ { │
│ domain = "@audio"; │
│ item = "memlock"; │
│ type = "-"; │
│ value = "unlimited"; │
│ } │
│ { │
│ domain = "@audio"; │
│ type = "-"; │
│ item = "nice"; │
│ value = -11; │
│ } │
│ ]; │
│ }; │
│ }; │
│ } │
└────────────────────────────────────────────────────────────────────────────────────┘
┌─ NIX ────────────────────────────────┐
│ { │
│ lib, │
│ config, │
│ ... │
│ }: let │
│ inherit (builtins) elem; │
│ inherit (lib) mkIf; │
│ inherit (config.ooknet.hardware) features; │
│ in { │
│ # generic audio configuration │
│ config = mkIf (elem "audio" features) { │
│ services = { │
│ pipewire = { │
│ enable = true; │
│ audio.enable = true; │
│ alsa = { │
│ enable = true; │
│ support32Bit = true; │
│ }; │
│ pulse.enable = true; │
│ jack.enable = true; │
│ wireplumber = { │
│ enable = true; │
│ # keep BT headphones in A2DP, dont │
│ auto-flip to mono HFP when an app grabs the │
│ mic │
│ extraConfig."51-bluez-no-hfp-switc │
│ h"."wireplumber.settings"."bluetooth.autoswi │
│ tch-to-headset-profile" = false; │
│ }; │
│ }; │
│ pulseaudio.enable = false; │
│ }; │
│ │
│ security = { │
│ rtkit.enable = true; │
│ pam.loginLimits = [ │
│ { │
│ domain = "@audio"; │
│ item = "nofile"; │
│ type = "soft"; │
│ value = "99999"; │
│ } │
│ { │
│ domain = "@audio"; │
│ item = "nofile"; │
│ type = "hard"; │
│ value = "99999"; │
│ } │
│ { │
│ domain = "@audio"; │
│ item = "rtprio"; │
│ type = "-"; │
│ value = "99"; │
│ } │
│ { │
│ domain = "@audio"; │
│ item = "memlock"; │
│ type = "-"; │
│ value = "unlimited"; │
│ } │
│ { │
│ domain = "@audio"; │
│ type = "-"; │
│ item = "nice"; │
│ value = -11; │
│ } │
│ ]; │
│ }; │
│ }; │
│ } │
└──────────────────────────────────────────────┘
──────────────────────────────────────────────────────────────────────────────────────
OOKNET
────────────────────────────────────────────────
OOKNET