mirror of
https://git.adityakumar.xyz/nix-conf.git
synced 2024-11-21 19:52:52 +00:00
add sound
This commit is contained in:
parent
6679dc1725
commit
824d97dc88
3 changed files with 21 additions and 13 deletions
|
@ -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;
|
||||
|
|
|
@ -9,5 +9,6 @@
|
|||
./kernel
|
||||
./locale
|
||||
./networking
|
||||
./sound
|
||||
];
|
||||
}
|
||||
|
|
20
modules/nixos/sound/default.nix
Normal file
20
modules/nixos/sound/default.nix
Normal 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;
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue