NixOS system configurations + dotfiles via home-manager
1{ lib, ... }:
2{
3 flake.modules.nixos.desktop =
4 { config, pkgs, ... }:
5 {
6 config = lib.mkIf config.hardware.bluetooth.enable {
7 environment.systemPackages = [ pkgs.bluetuith ];
8 environment.persistence.nixos.directories = [ "/var/lib/bluetooth" ];
9 systemd.user.services.mpris-proxy = {
10 unitConfig = {
11 Description = "Proxy Bluetooth Controls via MPRIS";
12 BindsTo = [ "bluetooth.target" ];
13 After = [ "bluetooth.target" ];
14 };
15 wantedBy = [ "bluetooth.target" ];
16 serviceConfig = {
17 Type = "simple";
18 ExecStart = "${pkgs.bluez}/bin/mpris-proxy";
19 };
20 };
21 };
22 };
23}