config/audio-server: allow bluetooth from all

This commit is contained in:
Astro 2022-03-17 23:41:24 +01:00
parent 701c6892ac
commit e98a037497
1 changed files with 13 additions and 0 deletions

View File

@ -48,5 +48,18 @@
userServices = true;
};
};
systemd.services.bluetooth-agent = lib.mkIf config.hardware.bluetooth.enable {
description = "Allow anyone to pair via Bluetooth";
wantedBy = [ "multi-user.target" ];
requires = [ "bluetooth.target" ];
after = [ "bluetooth.service" ];
serviceConfig = {
Type = "simple";
ExecStart = "${pkgs.bluez-tools}/bin/bt-agent -c NoInputNoOutput";
Restart = "on-failure";
RestartSec = 60;
};
};
};
}