blob: 66b23a678b408890e9ab28cc1145fc44000dedb6 (
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
37
38
39
40
41
42
|
# TUI for systemctl
{
config,
lib,
pkgs,
...
}:
let
cfg = config.system.systemctl-tui;
in
{
options.system.systemctl-tui = {
enable = lib.mkEnableOption "Enables systemctl-tui.";
package = lib.mkOption {
type = lib.types.package;
readOnly = true;
default = pkgs.systemctl-tui;
description = "The systemctl-tui package to use.";
};
};
config = lib.mkMerge [
(lib.mkIf cfg.enable {
home.file.".local/share/icons/hicolor/scalable/apps/systemd.svg" = {
source = ../../../assets/icons/apps/systemd.svg;
};
home.packages = [ cfg.package ];
})
(lib.mkIf (cfg.enable && config.terminal.kitty.enable) {
xdg.desktopEntries."systemctl-tui" = {
name = "systemctl-tui";
exec = "${lib.getExe config.terminal.kitty.package} --class systemctl-tui -e ${lib.getExe cfg.package}";
icon = "systemd";
categories = [ "System" ];
comment = "TUI for systemctl";
terminal = false;
type = "Application";
};
})
];
}
|