diff --git a/akame/mods.nix b/akame/mods.nix index 1b67ff5..388fd07 100644 --- a/akame/mods.nix +++ b/akame/mods.nix @@ -12,6 +12,7 @@ bluetooth = { disabledPlugins = [ "input" ]; enable = true; + powerOnBoot = false; }; nvidia = { modesetting.enable = true; diff --git a/lwad/general-graphical.nix b/lwad/general-graphical.nix index 11de03b..1fd7227 100644 --- a/lwad/general-graphical.nix +++ b/lwad/general-graphical.nix @@ -412,6 +412,8 @@ in { address="$(select_device)" if ${test} -n "$address"; then + ${bluetoothctl} power on + disconnect_other "$address" remaining_connection_attempts=3 @@ -486,9 +488,13 @@ in { }; wireshark.enable = true; }; - services.unclutter-xfixes = { - enable = lib.mkDefault true; - timeout = 1; + services = { + udev.extraRules = '' + ACTION=="remove", SUBSYSTEM=="bluetooth", RUN="${pkgs.bluez}/bin/bluetoothctl power off"''; + unclutter-xfixes = { + enable = lib.mkDefault true; + timeout = 1; + }; }; users.users.lukew.extraGroups = [ "wireshark" ]; xdg.mime.defaultApplications = lib.genAttrs [ diff --git a/ryuko/mods.nix b/ryuko/mods.nix index 20da6b3..0c941ec 100644 --- a/ryuko/mods.nix +++ b/ryuko/mods.nix @@ -4,6 +4,7 @@ hardware.bluetooth = { disabledPlugins = [ "input" ]; enable = true; + powerOnBoot = false; }; home-manager.users.lukew = { home.stateVersion = "23.11";