feat(module): add common hardware/peripherals module
refactor(module): move audio configuration to module
This commit is contained in:
parent
77c95c1140
commit
078657f1e2
7 changed files with 52 additions and 68 deletions
24
modules/nixos/common/audio/default.nix
Normal file
24
modules/nixos/common/audio/default.nix
Normal 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;
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue