diff --git a/hosts/fwbook.nix b/hosts/fwbook.nix index 5400f31..e290f1a 100644 --- a/hosts/fwbook.nix +++ b/hosts/fwbook.nix @@ -6,11 +6,14 @@ let in { imports = [ ./fwbook.hardware-configuration.nix ]; + # Skyg skyg.user.enabled = true; skyg.nixos.desktop = { enabled = true; kde.enabled = true; }; + skyg.nixos.common.hardware.sound.enable = true; + # Firmware updater services.fwupd.enable = true; services.fwupd.package = (import (builtins.fetchTarball { diff --git a/modules/nixos/common/hardware/sound.nix b/modules/nixos/common/hardware/sound.nix index c2a336b..a791d1b 100644 --- a/modules/nixos/common/hardware/sound.nix +++ b/modules/nixos/common/hardware/sound.nix @@ -1,12 +1,25 @@ -{ ... }: { - # Enable sound with pipewire. - sound.enable = true; - hardware.pulseaudio.enable = false; - security.rtkit.enable = true; - services.pipewire = { - enable = true; - alsa.enable = true; - alsa.support32Bit = true; - pulse.enable = true; +{ lib +, config +, ... +}: +let + cfg = config.skyg.nixos.common.hardware.sound; +in +{ + options.skyg.nixos.common.hardware.sound = with lib; { + enable = mkEnableOption "sound"; + }; + + config = lib.mkIf cfg.enable { + # Enable sound with pipewire. + sound.enable = true; + hardware.pulseaudio.enable = false; + security.rtkit.enable = true; + services.pipewire = { + enable = true; + alsa.enable = true; + alsa.support32Bit = true; + pulse.enable = true; + }; }; }