add bluetooth

This commit is contained in:
Aleksandr 2024-09-23 21:31:13 +03:00
parent ab22fcb51f
commit 689f5dea6d
3 changed files with 18 additions and 0 deletions

View file

@ -3,6 +3,8 @@
sys = {
enable = true;
hostname = "lil-maid";
bluetooth.enable = true;
};
masters.nero.enable = true;

View file

@ -13,6 +13,8 @@
};
};
services.blueman.enable = true;
boot.kernelPackages = pkgs.linuxPackages_latest;
boot.kernelModules = [ "btusb" "kvm-amd" ];

View file

@ -13,6 +13,15 @@ in
hostname = lib.mkOption {
type = types.str;
};
bluetooth = {
enable = lib.mkEnableOption "bluetooth";
powerOnBoot = lib.mkOption {
type = types.bool;
default = true;
description = "whether to power on bluetooth on system startup";
};
};
};
config = lib.mkIf sys.enable {
@ -23,5 +32,10 @@ in
trusted-public-keys = ["hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="];
};
nix.settings.experimental-features = [ "nix-command" "flakes" ];
hardware.bluetooth = lib.mkIf sys.bluetooth.enable {
enable = true;
powerOnBoot = sys.bluetooth.powerOnBoot;
};
};
}