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

28 lines
623 B
Nix

{
config,
lib,
namespace,
...
}: let
inherit (lib) mkIf mkEnableOption;
inherit (lib.${namespace}) getAttrByNamespace mkOptionsWithNamespace mkPersistRootDir;
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 = [
(mkPersistRootDir config "/var/lib/bluetooth")
];
};
}