diff --git a/sys/modules/audio.nix b/sys/modules/audio.nix new file mode 100644 index 0000000..df248fe --- /dev/null +++ b/sys/modules/audio.nix @@ -0,0 +1,29 @@ +{ + config, + lib, + pkgs, + ... +}: +with lib; let + cfg = config.local.sys.audio; +in { + options.local.sys.audio = { + enable = mkEnableOption "audio settings"; + }; + config = mkIf cfg.enable { + security.rtkit.enable = true; + + services.pipewire = { + enable = true; + + alsa = { + enable = true; + support32Bit = true; + }; + + jack.enable = true; + pulse.enable = true; + wireplumber.enable = true; + }; + }; +} diff --git a/sys/modules/default.nix b/sys/modules/default.nix index 9f6fdcc..eed6ea4 100644 --- a/sys/modules/default.nix +++ b/sys/modules/default.nix @@ -7,5 +7,6 @@ imports = [ ./baseline.nix ./yubikey.nix + ./audio.nix ]; } diff --git a/sys/platforms/posixlycorrect/default.nix b/sys/platforms/posixlycorrect/default.nix index 2125f47..3497bd1 100644 --- a/sys/platforms/posixlycorrect/default.nix +++ b/sys/platforms/posixlycorrect/default.nix @@ -16,6 +16,7 @@ baseline.enable = true; yubikey.enable = true; + audio.enable = true; }; # Use the systemd-boot EFI boot loader. @@ -50,21 +51,6 @@ hardware.graphics.enable = true; - security.rtkit.enable = true; - - services.pipewire = { - enable = true; - - alsa = { - enable = true; - support32Bit = true; - }; - - jack.enable = true; - pulse.enable = true; - wireplumber.enable = true; - }; - users = { users.fabian = { isNormalUser = true;