nixos-config/modules/sound/default.nix
2021-11-21 19:07:12 +01:00

21 lines
496 B
Nix

{ 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" ];
};
}