aboutsummaryrefslogtreecommitdiffstats
path: root/modules/networking/bluetui/default.nix
blob: 81cf11db342ad0047176e87a9e1657215945fc26 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# Bluetooth TUI client
{
  config,
  lib,
  pkgs,
  ...
}:
{
  imports = [
    ./assertions.nix
  ];

  options.networking.bluetui = {
    enable = lib.mkEnableOption "Enables bluetui.";
    package = lib.mkPackageOption pkgs "bluetui" { };
  };

  config = lib.mkIf config.networking.bluetui.enable {
    home.file.".local/share/icons/hicolor/scalable/apps/bluetooth.svg" = {
      source = ../../../assets/icons/bluetooth.svg;
    };

    xdg.desktopEntries."bluetui" = {
      name = "bluetui";
      exec = "${lib.getExe config.terminal.kitty.package} -e ${lib.getExe config.networking.bluetui.package}";
      icon = "bluetooth";
      categories = [ "Network" ];
      comment = "Bluetooth TUI client";
      terminal = false;
      type = "Application";
    };
    home.packages = [
      config.networking.bluetui.package
    ];
  };
}