diff --git a/config/desktop.nix b/config/desktop.nix index 25f2f8a..b977511 100644 --- a/config/desktop.nix +++ b/config/desktop.nix @@ -70,10 +70,19 @@ alsa.enable = true; alsa.support32Bit = true; pulse.enable = true; - # If you want to use JACK applications, uncomment this - #jack.enable = true; - # wireplumber exists so, lets *not* use the example session + # wireplumber exists! wireplumber.enable = true; }; + + wireplumber.configPackages = [ + (pkgs.writeTextDir "share/wireplumber/bluetooth.lua.d/51-bluez-config.lua" '' + bluez_monitor.properties = { + ["bluez5.enable-sbc-xq"] = true, + ["bluez5.enable-msbc"] = true, + ["bluez5.enable-hw-volume"] = true, + ["bluez5.headset-roles"] = "[ hsp_hs hsp_ag hfp_hf hfp_ag ]" + } + '') + ]; } diff --git a/config/intel.nix b/config/intel.nix new file mode 100644 index 0000000..bbc1fee --- /dev/null +++ b/config/intel.nix @@ -0,0 +1,16 @@ +{ + config, + pkgs, + ... +}: { + # opengl and graphics settings + # https://nixos.wiki/wiki/Accelerated_Video_Playback + hardware.opengl = { + enable = true; + extraPackages = with pkgs; [ + intel-media-driver # LIBVA_DRIVER_NAME=iHD + libvdpau-va-gl + ]; + }; + environment.sessionVariables = { LIBVA_DRIVER_NAME = "iHD"; }; +} \ No newline at end of file diff --git a/config/laptop.nix b/config/laptop.nix new file mode 100644 index 0000000..f084e2e --- /dev/null +++ b/config/laptop.nix @@ -0,0 +1,12 @@ +# This is your system's configuration file. +# Use this to configure your system environment (it replaces /etc/nixos/configuration.nix) +{ + inputs, + outputs, + lib, + config, + pkgs, + ... +}: { + +} diff --git a/config/nixos.nix b/config/nixos.nix index 810cef9..e5fe112 100644 --- a/config/nixos.nix +++ b/config/nixos.nix @@ -78,7 +78,10 @@ # enables support for Bluetooth # https://nixos.wiki/wiki/Bluetooth - hardware.bluetooth.enable = true; + hardware.bluetooth = { + enable = true; + powerOnBoot = false; + }; # Enable CUPS to print documents. services.printing = { diff --git a/machines/thonkpad/default.nix b/machines/thonkpad/default.nix index 8743d9f..d799e0a 100644 --- a/machines/thonkpad/default.nix +++ b/machines/thonkpad/default.nix @@ -12,6 +12,12 @@ # use shared configuration ../../config/nixos.nix + + # laptop configuration + #../../config/laptop.nix + + # intel opengl setup + ../../config/intel.nix ]; # who up thonking they @@ -45,17 +51,6 @@ ]; }; - # opengl and graphics settings - # https://nixos.wiki/wiki/Accelerated_Video_Playback - hardware.opengl = { - enable = true; - extraPackages = with pkgs; [ - intel-media-driver # LIBVA_DRIVER_NAME=iHD - libvdpau-va-gl - ]; - }; - environment.sessionVariables = { LIBVA_DRIVER_NAME = "iHD"; }; - # This value determines the NixOS release from which the default # settings for stateful data, like file locations and database versions # on your system were taken. It‘s perfectly fine and recommended to leave diff --git a/machines/thunkpad/default.nix b/machines/thunkpad/default.nix index 82d3a0d..25e0b9a 100644 --- a/machines/thunkpad/default.nix +++ b/machines/thunkpad/default.nix @@ -12,6 +12,12 @@ # use shared configuration ../../config/nixos.nix + + # laptop configuration + #../../config/laptop.nix + + # intel opengl setup + ../../config/intel.nix ]; # who up thunking they