feat(module): add common hardware/peripherals module

refactor(module): move audio configuration to module
This commit is contained in:
Jo 2024-09-07 08:46:55 +02:00
parent 77c95c1140
commit 078657f1e2
7 changed files with 52 additions and 68 deletions

View file

@ -0,0 +1,24 @@
{
lib,
inputs,
namespace,
config,
...
}: with lib; with lib.${namespace};
let
cfg = config.${namespace}.common.audio;
in {
options.${namespace}.common.audio = { enable = mkEnableOption "whether to enable common audio support and tweaks"; };
config = mkIf cfg.enable {
hardware.pulseaudio.enable = false;
security.rtkit.enable = true;
services.pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
};
};
}