From 05571aa5ed5eb898be468bff237657914f7e9dcf Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Sun, 29 Apr 2018 15:00:53 +0200 Subject: Delay startup of non-essential services --- modules/hardware/laptop.nix | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'modules/hardware/laptop.nix') 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; [ -- cgit 1.4.1