nixos-config/modules/sound/default.nix

22 lines
496 B
Nix
Raw Normal View History

2021-11-21 19:07:12 +01:00
{ pkgs, config, lib, ... }:
with lib;
let cfg = config.eboskma.sound;
in
{
options.eboskma.sound.enable = mkEnableOption "activate sound settings";
config = mkIf (cfg.enable) {
sound.enable = true;
services = {
pipewire = {
enable = true;
pulse.enable = true;
media-session.enable = true;
};
};
environment.systemPackages = with pkgs; [ pavucontrol ];
users.extraUsers.${config.eboskma.var.mainUser}.extraGroups = [ "audio" ];
};
}