diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..1093752 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +nixos/hardware-configuration.nix diff --git a/nixos/modules/bluetooth.nix b/nixos/modules/bluetooth.nix index 88433ee..a5eda4b 100644 --- a/nixos/modules/bluetooth.nix +++ b/nixos/modules/bluetooth.nix @@ -9,4 +9,17 @@ hardware.bluetooth.powerOnBoot = true; services.blueman.enable = true; + + systemd.user.services.auto-bluetooth = { + description = "auto-bluetooth"; + serviceConfig = { + Type = "forking"; + ExecStart = "/home/vitrial/.local/bin/bluetooth-autoconnect"; + ExecStop = "pkill bluetooth-autoconnect"; + Restart = "on-failure"; + }; + wantedBy = [ "default.target" ]; + }; + + systemd.services.auto-bluetooth.enable = true; }