nixos-config/modules/sound/default.nix

24 lines
532 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;
};
};
security.rtkit.enable = true;
environment.systemPackages = with pkgs; [ pavucontrol ];
users.extraUsers.${config.eboskma.var.mainUser}.extraGroups = [ "audio" ];
};
}