From 7c6b77cb1c41848488eb5fc6c1a678959bda59dc Mon Sep 17 00:00:00 2001 From: joachimschmidt557 Date: Tue, 16 Nov 2021 14:16:52 +0100 Subject: [PATCH] Add -E command-line flag to bluetoothd --- nixos/dustbowl.nix | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/nixos/dustbowl.nix b/nixos/dustbowl.nix index bdf64cc..0f84f76 100644 --- a/nixos/dustbowl.nix +++ b/nixos/dustbowl.nix @@ -3,7 +3,7 @@ # and in the NixOS manual (accessible by running ‘nixos-help’). { emacs-overlay, nixpkgs }: -{ config, pkgs, ... }: +{ config, lib, pkgs, ... }: { imports = @@ -203,24 +203,31 @@ }; }; + # Hardware + + # Enable sound. + sound.enable = true; + + # Bluetooth + hardware.bluetooth.enable = true; + + systemd.services.bluetooth.serviceConfig.ExecStart = + let args = [ "-f" "/etc/bluetooth/main.conf" "-E" ]; + in lib.mkForce [ "" "${config.hardware.bluetooth.package}/libexec/bluetooth/bluetoothd ${lib.escapeShellArgs args}" ]; + systemd.user.services.mpris-proxy = { description = "Bluetooth mpris-player"; wantedBy = [ "graphical-session.target" ]; partOf = [ "graphical-session.target" ]; serviceConfig = { ExecStart = '' - ${pkgs.bluez}/bin/mpris-proxy + ${config.hardware.bluetooth.package}/bin/mpris-proxy ''; RestartSec = 3; Restart = "always"; }; }; - # Hardware - # Enable sound. - sound.enable = true; - hardware.bluetooth.enable = true; - # UPower services.upower.enable = true; @@ -275,7 +282,7 @@ backend = "glx"; vSync = true; }; - systemd.user.services.picom.serviceConfig.Restart = pkgs.lib.mkForce "no"; + systemd.user.services.picom.serviceConfig.Restart = lib.mkForce "no"; # xss-lock programs.xss-lock = {