34 lines
751 B
Nix
34 lines
751 B
Nix
|
# Must be paired with the pipewire Nix module, this does nothing but install packages
|
||
|
{
|
||
|
config,
|
||
|
lib,
|
||
|
pkgs,
|
||
|
...
|
||
|
}:
|
||
|
with lib; let
|
||
|
cfg = config.sound.hardware.focusrite;
|
||
|
in {
|
||
|
options.focusrite = {
|
||
|
enable = mkEnableOption "Focusrite audio interface support";
|
||
|
guiSupport = mkOption {
|
||
|
type = types.bool;
|
||
|
default = false;
|
||
|
description = "Enable GUI support for Focusrite Scarlett audio interface (installs alsa-scarlett-gui)";
|
||
|
};
|
||
|
};
|
||
|
config = mkIf cfg.enable (mkMerge [
|
||
|
{
|
||
|
environment.systemPackages = with pkgs;
|
||
|
[
|
||
|
scarlett2
|
||
|
alsa-scarlett-gui
|
||
|
]
|
||
|
++ (
|
||
|
if cfg.guiSupport
|
||
|
then [pkgs.alsa-scarlett-gui]
|
||
|
else []
|
||
|
);
|
||
|
}
|
||
|
]);
|
||
|
}
|