summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--system/settings/hardware/bluetooth-audio.nix14
-rw-r--r--system/settings/hardware/bluetooth.nix19
-rw-r--r--system/settings/hardware/laptop.nix25
3 files changed, 39 insertions, 19 deletions
diff --git a/system/settings/hardware/bluetooth-audio.nix b/system/settings/hardware/bluetooth-audio.nix
new file mode 100644
index 00000000..69f46984
--- /dev/null
+++ b/system/settings/hardware/bluetooth-audio.nix
@@ -0,0 +1,14 @@
+{ config, pkgs, ... }:
+
+{
+  hardware = {
+    bluetooth = {
+      package = pkgs.bluezFull;
+    };
+    pulseaudio = {
+      extraModules = with pkgs; [
+        pulseaudio-modules-bt
+      ];
+    };
+  };
+}
diff --git a/system/settings/hardware/bluetooth.nix b/system/settings/hardware/bluetooth.nix
new file mode 100644
index 00000000..dbff48ec
--- /dev/null
+++ b/system/settings/hardware/bluetooth.nix
@@ -0,0 +1,19 @@
+{ config, pkgs, ... }:
+
+{
+  hardware = {
+    bluetooth = {
+      enable = true;
+      powerOnBoot = false;
+    };
+  };
+  systemd.services.bluetooth.restartIfChanged = false;
+
+  environment.systemPackages = with pkgs; [
+    bluez-tools
+  ];
+
+  services.blueman = {
+    enable = true;
+  };
+}
diff --git a/system/settings/hardware/laptop.nix b/system/settings/hardware/laptop.nix
index 24e7db86..1ea90628 100644
--- a/system/settings/hardware/laptop.nix
+++ b/system/settings/hardware/laptop.nix
@@ -1,23 +1,14 @@
 { config, pkgs, lib, ... }:
 
-{ boot.kernelModules = [ "coretemp" ];
+{
+  imports = [
+    ./bluetooth.nix
+    ./bluetooth-audio.nix
+  ];
 
-  hardware = {
-    bluetooth = {
-      enable = true;
-      powerOnBoot = false;
-      package = pkgs.bluezFull;
-    };
-    pulseaudio = {
-      extraModules = with pkgs; [
-        pulseaudio-modules-bt
-      ];
-    };
-  };
-  systemd.services.bluetooth.restartIfChanged = false;
+  boot.kernelModules = [ "coretemp" ];
 
   environment.systemPackages = with pkgs; [
-    bluez-tools
 
     powerstat
     powertop
@@ -67,10 +58,6 @@
     '';
   };
 
-  services.blueman = {
-    enable = true;
-  };
-
   services.xserver = {
     libinput = {
       enable = lib.mkDefault true;