nix-config/modules/hardware/audio.nix
2025-04-26 11:47:41 +02:00

27 lines
500 B
Nix

{
inputs,
outputs,
lib,
config,
pkgs,
...
}: let
inherit (lib) mkEnableOption mkIf mkOption types;
cfg = config.horseman.hardware.audio;
in {
options = {
horseman.hardware.audio = {
enable = mkEnableOption "";
};
};
config = mkIf cfg.enable {
services.pulseaudio.enable = false;
services.jack = {
jackd.enable = false;
alsa.enable = true;
loopback.enable = false;
};
users.extraUsers.horseman.extraGroups = ["jackaudio"];
};
}