dotfiles/home/profiles/audio.nix

36 lines
933 B
Nix
Raw Permalink Normal View History

{pkgs, config, lib, ...}:
let
cfg = config.profiles.audio;
audio-plugins = pkgs.symlinkJoin { name = "audio-plugins"; paths = [ pkgs.lsp-plugins pkgs.speech-denoiser ];};
in
{
options.profiles.audio = {
enable = lib.mkOption {
default = config.profiles.xsession.enable;
defaultText = "xsession.enable";
};
fancy = lib.mkOption {
default = cfg.enable;
defaultText = "audio.enable";
};
};
config = lib.mkIf config.profiles.audio.enable {
home.packages = with pkgs; [
] ++ lib.optionals config.profiles.gui.enable (with pkgs; [
pavucontrol
2022-06-02 05:08:38 +02:00
]) ++ lib.optionals (config.nixpkgs.config.allowUnfree && config.profiles.gui.enable) (with pkgs; [
spotify
]) ++ lib.optionals cfg.fancy (with pkgs; [
carla
]);
home.file."audio-plugins" = lib.mkIf cfg.fancy {
source = "${audio-plugins}/lib";
target = "audio-plugins";
};
};
}