add sound

This commit is contained in:
Aditya 2024-04-10 23:33:35 +05:30
parent 6679dc1725
commit 824d97dc88
Signed by: aditya
SSH key fingerprint: SHA256:jL1IvWsjjlPtw6HvDIHfXfhO9IkIokNEyIfuFhSdoyU
3 changed files with 21 additions and 13 deletions

View file

@ -62,19 +62,6 @@
services.printing.enable = true;
# Enable sound with pipewire.
sound.enable = true;
hardware.pulseaudio.enable = false;
security.rtkit.enable = true;
services.pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
# If you want to use JACK applications, uncomment this
#jack.enable = true;
#media-session.enable = true;
};
# Enable touchpad support (enabled default in most desktopManager).
# services.xserver.libinput.enable = true;

View file

@ -9,5 +9,6 @@
./kernel
./locale
./networking
./sound
];
}

View file

@ -0,0 +1,20 @@
{
config,
lib,
...
}: {
options = {
sound.enable = lib.mkEnableOption "enable sound";
};
config = lib.mkIf config.sound.enable {
sound.enable = true;
hardware.pulseaudio.enable = false;
security.rtkit.enable = true;
services.pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
};
};
}