aboutsummaryrefslogtreecommitdiffstats
path: root/modules/networking/bluetui/default.nix
blob: c6cb96b90257249260dd1f3a8158035d7654a384 (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
# Bluetui - Bluetooth TUI client
{
  config,
  lib,
  pkgs,
  ...
}:
let
  bluetuiDesktopItem = pkgs.makeDesktopItem {
    name = "bluetui";
    desktopName = "BlueTUI";
    exec = "${lib.getExe config.terminal.kitty.package} --class bluetui -e ${lib.getExe config.networking.bluetui.package}";
    icon = "kitty";
    categories = [ "Network" ];
    comment = "Bluetooth TUI client";
    terminal = false;
    type = "Application";
  };
in
{
  imports = [
    ./assertions.nix
  ];

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

  config = lib.mkIf config.networking.bluetui.enable {
    home.packages = [
      config.networking.bluetui.package
      bluetuiDesktopItem
    ];
  };
}