blob: 00e8d2a3f296e028a94da0fe51134be9c6af7f8b (
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
|
# w3m - Text-based web browser and pager
{
config,
lib,
pkgs,
...
}:
{
imports = [
./assertions.nix
];
options.web.w3m = {
enable = lib.mkEnableOption "Enables w3m.";
package = lib.mkOption {
type = lib.types.package;
default = config.programs.w3m.finalPackage;
defaultText = lib.literalExpression "config.programs.w3m.finalPackage";
description = "Package to use for w3m. Defaults to the wrapped finalPackage from programs.w3m.";
};
};
config = lib.mkIf config.web.w3m.enable {
xdg.desktopEntries."w3m" = {
name = "w3m";
exec = "${lib.getExe config.terminal.kitty.package} --class w3m -e ${lib.getExe' config.web.w3m.package "w3m"}";
icon = "kitty";
categories = [ "Network" ];
comment = "Text-based web browser";
terminal = false;
type = "Application";
};
programs.w3m.enable = true;
home.packages = [
config.web.w3m.package
];
};
}
|