From dc8df3060abc19c13544e831d9b351ecf8ef4361 Mon Sep 17 00:00:00 2001 From: Gabe Venberg Date: Thu, 30 Oct 2025 22:28:03 +0100 Subject: [PATCH] added bluetooth to harmatan. --- configs/nixos/bluetooth.nix | 44 +++++++++++++++++++++++++++++++++++++ hosts/harmatan/default.nix | 1 + 2 files changed, 45 insertions(+) create mode 100644 configs/nixos/bluetooth.nix diff --git a/configs/nixos/bluetooth.nix b/configs/nixos/bluetooth.nix new file mode 100644 index 0000000..abe94bd --- /dev/null +++ b/configs/nixos/bluetooth.nix @@ -0,0 +1,44 @@ +{ + config, + pkgs, + lib, + ... +}: { + hardware.bluetooth = { + enable = true; + powerOnBoot = true; + settings = { + General = { + # Shows battery charge of connected devices on supported + # Bluetooth adapters. Defaults to 'false'. + # Experimental = true; + # When enabled other devices can connect faster to us, however + # the tradeoff is increased power consumption. Defaults to + # 'false'. + # FastConnectable = true; + }; + Policy = { + # Enable all controllers when they are found. This includes + # adapters present on start as well as adapters that are plugged + # in later on. Defaults to 'true'. + AutoEnable = true; + }; + }; +}; +# services.blueman.enable = true; + home-manager.users.${config.host.details.user} = { + config, + osConfig, + lib, + ... + }: { + home.packages = with pkgs; + lib.mkMerge [ + ( + lib.mkIf (osConfig.host.details.gui.enable) + [ ] + ) + [ bluetui ] + ]; + }; +} diff --git a/hosts/harmatan/default.nix b/hosts/harmatan/default.nix index 4aebe6f..b101cbb 100644 --- a/hosts/harmatan/default.nix +++ b/hosts/harmatan/default.nix @@ -21,6 +21,7 @@ inputs.nixpkgs.lib.nixosSystem { ../../configs/nixos/syncthing.nix ../../configs/nixos/touchpad.nix ../../configs/nixos/i3 + ../../configs/nixos/bluetooth.nix ../../roles/nixos/gaming.nix ../../roles/nixos/power-saving.nix ({