yumeami/modules/nixos/hardware/bluetooth/default.nix
C4 Patino de972b9fb0
Some checks failed
ci / treefmt (push) Failing after 4s
feat: fix all initial impermanence perm folder creation
2026-07-01 00:42:13 -05:00

31 lines
633 B
Nix

{
config,
lib,
namespace,
...
}: let
inherit (lib) mkIf mkEnableOption;
inherit (lib.${namespace}) getAttrByNamespace mkOptionsWithNamespace;
base = "${namespace}.hardware.bluetooth";
cfg = getAttrByNamespace config base;
in {
options = mkOptionsWithNamespace base {
enable = mkEnableOption "bluetooth";
};
config = mkIf cfg.enable {
services.blueman.enable = true;
hardware.bluetooth = {
enable = true;
powerOnBoot = true;
};
${namespace}.services.storage.impermanence.folders = [
{
directory = "/var/lib/bluetooth";
mode = "700";
}
];
};
}