From 60d2f5a347abbd7e81f7e3319fa4c942b0f8905a Mon Sep 17 00:00:00 2001 From: Miranda Marquez Date: Thu, 11 Apr 2024 12:54:52 -0800 Subject: [PATCH] move pipewire to its own file --- configuration.nix | 17 ----------------- flake.nix | 7 ++++++- modules/sound/pipewire.nix | 19 +++++++++++++++++++ 3 files changed, 25 insertions(+), 18 deletions(-) create mode 100644 modules/sound/pipewire.nix diff --git a/configuration.nix b/configuration.nix index a05a2a0..11a3ca3 100644 --- a/configuration.nix +++ b/configuration.nix @@ -114,23 +114,6 @@ }; }; - # 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; - # If you want to use JACK applications, uncomment this - #jack.enable = true; - - # use the example session manager (no others are packaged yet so this is enabled by default, - # no need to redefine it in your config for now) - #media-session.enable = true; - }; - # Enable touchpad support (enabled default in most desktopManager). # services.xserver.libinput.enable = true; diff --git a/flake.nix b/flake.nix index 9d762f8..e81d5aa 100644 --- a/flake.nix +++ b/flake.nix @@ -48,7 +48,8 @@ ./configuration.nix { networking.hostName = "kremzeek"; boot.loader.efi.canTouchEfiVariables = true; - sound.enable = true; + # sound.enable = true; + # hardware.pulseaudio.enable = true; } home-manager.nixosModules.home-manager { @@ -79,6 +80,7 @@ sound.enable = true; # only on unstable? } ./hardware/galvatron-hw.nix + ./modules/sound/pipewire.nix inputs.apple-silicon.nixosModules.apple-silicon-support inputs.home-manager-unstable.nixosModules.home-manager { home-manager.useGlobalPkgs = true; @@ -101,6 +103,7 @@ } ./server/services.nix ./hardware/breakdown-hw.nix + ./modules/sound/pipewire.nix home-manager.nixosModules.home-manager { home-manager.useGlobalPkgs = true; @@ -123,6 +126,7 @@ sound.enable = true; } ./hardware/starscream-hw.nix + ./modules/sound/pipewire.nix home-manager.nixosModules.home-manager { home-manager.useGlobalPkgs = true; @@ -150,6 +154,7 @@ } ./modules/droidcam-obs.nix # only this machine ./hardware/knockout-hw.nix + ./modules/sound/pipewire.nix inputs.home-manager-unstable.nixosModules.home-manager { home-manager.useGlobalPkgs = true; diff --git a/modules/sound/pipewire.nix b/modules/sound/pipewire.nix new file mode 100644 index 0000000..c07e8c2 --- /dev/null +++ b/modules/sound/pipewire.nix @@ -0,0 +1,19 @@ +{ config, lib, pkgs, nixos-unstable, inputs, ... }: +{ + # 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; + # If you want to use JACK applications, uncomment this + #jack.enable = true; + + # use the example session manager (no others are packaged yet so this is enabled by default, + # no need to redefine it in your config for now) + #media-session.enable = true; + }; +}