{ lib, config, pkgs, flakeRoot, home-manager, ... }: let username = config.defaultUser or "henrov"; in { ############################ # Bluetooth daemon ############################ hardware.bluetooth = { enable = true; powerOnBoot = true; package = pkgs.bluez; # singular, not a list }; ############################ # GUI Bluetooth manager ############################ environment.systemPackages = with pkgs; [ blueman ]; ############################ # Optional Home Manager integration ############################ _module.args.hmUsers = lib.mkIf (home-manager != null) { ${username} = { # If you want a graphical tray or manager accessible in user session home.packages = [ pkgs.blueman ]; # Example: could drop any config files for blueman here home.file = {}; }; }; }