Initial commit

This commit is contained in:
2026-02-01 00:42:40 +08:00
commit 17c5379a9a
11 changed files with 514 additions and 0 deletions

View File

@@ -0,0 +1,44 @@
{ config, pkgs, lib, ... }:
let
cfg = config.my.audio.pipewire;
in
{
options.my.audio.pipewire = {
support32Bit = lib.mkOption {
type = lib.types.bool;
default = true;
description = "Enable 32-bit ALSA support (useful for some games/apps).";
};
tools = lib.mkOption {
type = lib.types.enum [ "none" "basic" "full" ];
default = "basic";
description = "Install common audio tools.";
};
};
config = {
security.rtkit.enable = true;
services.pipewire = {
enable = true;
wireplumber.enable = true;
alsa = {
enable = true;
support32Bit = cfg.support32Bit;
};
pulse.enable = true;
jack.enable = true;
};
environment.systemPackages =
if cfg.tools == "none" then
[ ]
else if cfg.tools == "basic" then
with pkgs; [ pavucontrol ]
else
with pkgs; [ pavucontrol pulsemixer helvum ];
};
}