make pipewire optional

This commit is contained in:
Sean Buckley 2021-06-11 18:59:22 -04:00
parent e8a65cd5c6
commit 7e55279252
3 changed files with 18 additions and 8 deletions

View file

@ -6,6 +6,7 @@
./modules/cli.nix ./modules/cli.nix
./modules/gnome.nix ./modules/gnome.nix
./modules/phpipam.nix ./modules/phpipam.nix
./modules/pipewire.nix
./modules/profiles.nix ./modules/profiles.nix
./modules/scansnap_s1300.nix ./modules/scansnap_s1300.nix
./modules/scroll-boost ./modules/scroll-boost

17
modules/pipewire.nix Normal file
View file

@ -0,0 +1,17 @@
{ lib, ... }:
let
cfg = config.sconfig.pipewire;
in
{
options.sconfig.pipewire = lib.mkEnableOption "Enable Pipewire";
config = lib.mkIf cfg {
hardware.pulseaudio.enable = false;
services.pipewire = {
enable = true;
pulse.enable = true;
alsa.enable = true;
alsa.support32Bit = true;
};
};
}

View file

@ -87,14 +87,6 @@ in
virtualisation.docker = { enable = true; enableOnBoot = false; }; virtualisation.docker = { enable = true; enableOnBoot = false; };
hardware.pulseaudio.enable = false;
services.pipewire = {
enable = true;
pulse.enable = true;
alsa.enable = true;
alsa.support32Bit = true;
};
boot.loader.timeout = boot.loader.timeout =
if config.boot.loader.systemd-boot.enable if config.boot.loader.systemd-boot.enable
then null else lib.mkOverride 9999 99; then null else lib.mkOverride 9999 99;