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 = { sys = {
enable = true; enable = true;
hostname = "lil-maid"; hostname = "lil-maid";
bluetooth.enable = true;
}; };
masters.nero.enable = true; masters.nero.enable = true;

View file

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

View file

@ -13,6 +13,15 @@ in
hostname = lib.mkOption { hostname = lib.mkOption {
type = types.str; 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 { config = lib.mkIf sys.enable {
@ -23,5 +32,10 @@ in
trusted-public-keys = ["hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="]; trusted-public-keys = ["hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="];
}; };
nix.settings.experimental-features = [ "nix-command" "flakes" ]; nix.settings.experimental-features = [ "nix-command" "flakes" ];
hardware.bluetooth = lib.mkIf sys.bluetooth.enable {
enable = true;
powerOnBoot = sys.bluetooth.powerOnBoot;
};
}; };
} }