Skip to content

Instantly share code, notes, and snippets.

@nh2
Created December 9, 2018 18:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nh2/94049ce3d3cc8ab82a814ded9f7b5277 to your computer and use it in GitHub Desktop.
Save nh2/94049ce3d3cc8ab82a814ded9f7b5277 to your computer and use it in GitHub Desktop.
Shows how to add `-P` to bluetoothd in NixOS
with import <nixpkgs> {};
stdenv.mkDerivation {
name = "bluez-patched-systemd-unit";
buildCommand = let
in ''
set -eo pipefail
cp -rvs ${pkgs.bluez} --no-preserve=mode $out
sed --in-place 's:bluetooth/bluetoothd:bluetooth/bluetoothd -P:g' $out/etc/systemd/system/bluetooth.service
'';
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment