From 96fb883ec47739a6eabb4fb2c9e4c6b086a170f5 Mon Sep 17 00:00:00 2001 From: Sandro Date: Tue, 8 Apr 2025 22:22:12 +0200 Subject: [PATCH] nixos/bluetooth: fix restartIfChanged X-RestartIfChanged must be in the Service section, not in Unit and we also have a shortcut for that. https://github.com/NixOS/nixpkgs/blob/8cc0451ead532078052ac7d3aa82e23572047acf/nixos/lib/systemd-lib.nix#L796 --- nixos/modules/services/hardware/bluetooth.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nixos/modules/services/hardware/bluetooth.nix b/nixos/modules/services/hardware/bluetooth.nix index d8907d554d33..ebe10199bb78 100644 --- a/nixos/modules/services/hardware/bluetooth.nix +++ b/nixos/modules/services/hardware/bluetooth.nix @@ -143,6 +143,8 @@ in { wantedBy = [ "bluetooth.target" ]; aliases = [ "dbus-org.bluez.service" ]; + # restarting can leave people without a mouse/keyboard + restartIfChanged = false; serviceConfig = { ExecStart = [ "" @@ -171,8 +173,6 @@ in PrivateNetwork = false; # tethering }; - # restarting can leave people without a mouse/keyboard - unitConfig.X-RestartIfChanged = false; }; } // (optionalAttrs cfg.hsphfpd.enable {