From d7af60e18c35a7f08ad073d94d4818946a8c079e Mon Sep 17 00:00:00 2001 From: Craige McWhirter Date: Mon, 6 Jan 2020 10:45:20 +1000 Subject: [PATCH] Added bluetooth --- roles/desktop_common.nix | 52 +++++++++++++++++++++++++++++++++------- 1 file changed, 44 insertions(+), 8 deletions(-) diff --git a/roles/desktop_common.nix b/roles/desktop_common.nix index c8ac3f5..7feaeb4 100644 --- a/roles/desktop_common.nix +++ b/roles/desktop_common.nix @@ -23,6 +23,7 @@ elisa # Elisa music player firefoxWrapper # install Firefox with support for plugins libreoffice-fresh + mplayer # A movie player that supports many video formats plasma-workspace-wallpapers user-manager nextcloud-client # Nextcloud desktop client @@ -35,6 +36,7 @@ # Enable common desktop services services.acpid.enable = true; + services.blueman.enable = true; powerManagement.enable = true; services.xserver.enable = true; @@ -43,15 +45,24 @@ services.xserver.desktopManager.plasma5.enable = true; # Enable KDE sound.enable = true; # Enable sound. - hardware.pulseaudio = { - enable = true; - package = pkgs.pulseaudioFull; + hardware = { + pulseaudio = { + enable = true; + extraModules = [ pkgs.pulseaudio-modules-bt ]; + package = pkgs.pulseaudioFull; + }; + bluetooth = { + enable = true; # Enable bluetooth + extraConfig = " + [General] + Enable=Source,Sink,Media,Socket + + [Policy] + AutoEnable=true + "; + }; + opengl.enable = true; }; - hardware.bluetooth.enable = true; # Enable bluetooth - hardware.bluetooth.extraConfig = " - [General] - Enable=Source,Sink,Media,Socket - "; # Configure Firefox and Chromium nixpkgs.config = { @@ -72,4 +83,29 @@ }; }; + # Groups to add + users.groups = { + audio.members = [ + "craige" + "fiona" + "hamish" + "logan" + "xander" + ]; + libvirtd.members = [ + "craige" + "fiona" + "hamish" + "logan" + "xander" + ]; + networkmanager.members = [ + "craige" + "fiona" + "hamish" + "logan" + "xander" + ]; + }; + }