mirror of
https://github.com/Theaninova/TheaninovOS.git
synced 2025-12-12 11:36:20 +00:00
refactor: make the whole thing more generic
This commit is contained in:
22
modules/nixos/hardware/audio.nix
Normal file
22
modules/nixos/hardware/audio.nix
Normal file
@@ -0,0 +1,22 @@
|
||||
{ pkgs, lib, config, ... }:
|
||||
with lib;
|
||||
|
||||
let cfg = config.hardware.audio.preset.pipewire;
|
||||
|
||||
in {
|
||||
options.hardware.audio.preset.pipewire = {
|
||||
enable = mkEnableOption "Enable pipewire with sane defaults";
|
||||
};
|
||||
|
||||
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;
|
||||
jack.enable = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user