feat: Disable bluetooth when not in use
This commit is contained in:
parent
d65ff34c38
commit
5298ff9074
3 changed files with 11 additions and 3 deletions
|
@ -12,6 +12,7 @@
|
|||
bluetooth = {
|
||||
disabledPlugins = [ "input" ];
|
||||
enable = true;
|
||||
powerOnBoot = false;
|
||||
};
|
||||
nvidia = {
|
||||
modesetting.enable = true;
|
||||
|
|
|
@ -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 [
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
hardware.bluetooth = {
|
||||
disabledPlugins = [ "input" ];
|
||||
enable = true;
|
||||
powerOnBoot = false;
|
||||
};
|
||||
home-manager.users.lukew = {
|
||||
home.stateVersion = "23.11";
|
||||
|
|
Loading…
Reference in a new issue