summary refs log tree commit diff stats
path: root/modules/hardware/laptop.nix
diff options
context:
space:
mode:
authorAlan Pearce2018-04-29 15:00:53 +0200
committerAlan Pearce2018-04-29 15:00:53 +0200
commit05571aa5ed5eb898be468bff237657914f7e9dcf (patch)
treeb7f271af5d42dce8caec06a66eaafd9e1ef6411d /modules/hardware/laptop.nix
parent68f44953449af2ad3565426e1716757fe7afc04b (diff)
downloadnixos-configuration-05571aa5ed5eb898be468bff237657914f7e9dcf.tar.lz
nixos-configuration-05571aa5ed5eb898be468bff237657914f7e9dcf.tar.zst
nixos-configuration-05571aa5ed5eb898be468bff237657914f7e9dcf.zip
Delay startup of non-essential services
Diffstat (limited to 'modules/hardware/laptop.nix')
-rw-r--r--modules/hardware/laptop.nix13
1 files changed, 12 insertions, 1 deletions
diff --git a/modules/hardware/laptop.nix b/modules/hardware/laptop.nix
index bd08308..c662885 100644
--- a/modules/hardware/laptop.nix
+++ b/modules/hardware/laptop.nix
@@ -6,7 +6,18 @@
   ];
 
   hardware = {
-    bluetooth.enable = true;
+    bluetooth = {
+      enable = true;
+      powerOnBoot = false;
+    };
+  };
+  systemd.services.bluetooth.wantedBy = lib.mkForce [];
+  systemd.timers.bluetooth = {
+    description = "Delayed startup of Bluetooth";
+    wantedBy = [ "timers.target" ];
+    timerConfig = {
+      OnActiveSec = "1 min";
+    };
   };
 
   environment.systemPackages = with pkgs; [