# LibrePods from NUR (nur.repos.chiasson) + Apple-ish BlueZ DeviceID for AirPods.
{ ... }: {
  flake.nixosModules.systemLibrepods =
    { config, lib, pkgs, ... }:
    let
      cfg = config.chiasson.system.librepods;
      librepodsPkg = pkgs.nur.repos.chiasson.librepods;
    in
    {
      options.chiasson.system.librepods.enable = lib.mkEnableOption ''
        LibrePods (NUR chiasson) + BlueZ DeviceID tweak. Needs working Bluetooth.
      '';

      config = lib.mkIf cfg.enable {
        hardware.bluetooth.settings.General.DeviceID = lib.mkDefault "bluetooth:004C:0000:0000";
        environment.systemPackages = [ librepodsPkg ];
      };
    };
}
