feat: less
This commit is contained in:
parent
9978c79bd1
commit
f9af0ee523
6 changed files with 40 additions and 6 deletions
|
@ -24,6 +24,7 @@ in {
|
||||||
journalctl = enabled;
|
journalctl = enabled;
|
||||||
jq = enabled;
|
jq = enabled;
|
||||||
just = enabled;
|
just = enabled;
|
||||||
|
less = enabled;
|
||||||
nh = enabled;
|
nh = enabled;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,6 +18,7 @@
|
||||||
./journalctl.nix
|
./journalctl.nix
|
||||||
./jq.nix
|
./jq.nix
|
||||||
./just.nix
|
./just.nix
|
||||||
|
./less.nix
|
||||||
./nemo.nix
|
./nemo.nix
|
||||||
./nh.nix
|
./nh.nix
|
||||||
./waybar.nix
|
./waybar.nix
|
||||||
|
|
27
modules/home/programs/less.nix
Normal file
27
modules/home/programs/less.nix
Normal file
|
@ -0,0 +1,27 @@
|
||||||
|
{
|
||||||
|
marleylib,
|
||||||
|
config,
|
||||||
|
osConfig,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
|
inherit (marleylib.module) mkEnableOption';
|
||||||
|
|
||||||
|
cfg = config.marleyos.programs.less;
|
||||||
|
osCfg = osConfig.marleyos.programs.less;
|
||||||
|
in {
|
||||||
|
options.marleyos.programs.less.enable = mkEnableOption' "less" osCfg.enable;
|
||||||
|
|
||||||
|
config = lib.mkIf cfg.enable {
|
||||||
|
programs.less.enable = true;
|
||||||
|
|
||||||
|
home.sessionVariables = let
|
||||||
|
osEnv = osConfig.programs.less.envVariables;
|
||||||
|
in
|
||||||
|
lib.mkIf (osEnv ? LESS) {
|
||||||
|
inherit (osEnv) LESS;
|
||||||
|
};
|
||||||
|
|
||||||
|
programs.lesspipe.enable = true;
|
||||||
|
};
|
||||||
|
}
|
|
@ -15,6 +15,7 @@ in {
|
||||||
curl = enabled;
|
curl = enabled;
|
||||||
fish = enabled;
|
fish = enabled;
|
||||||
jq = enabled;
|
jq = enabled;
|
||||||
|
less = enabled;
|
||||||
nh = enabled;
|
nh = enabled;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
./curl.nix
|
./curl.nix
|
||||||
./fish.nix
|
./fish.nix
|
||||||
./jq.nix
|
./jq.nix
|
||||||
|
./less.nix
|
||||||
./nh.nix
|
./nh.nix
|
||||||
./waybar.nix
|
./waybar.nix
|
||||||
];
|
];
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
{
|
{
|
||||||
lib,
|
|
||||||
config,
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
cfg = config.marleyos.programs.less;
|
cfg = config.marleyos.programs.less;
|
||||||
|
@ -8,12 +9,14 @@ in {
|
||||||
options.marleyos.programs.less.enable = lib.mkEnableOption "less";
|
options.marleyos.programs.less.enable = lib.mkEnableOption "less";
|
||||||
|
|
||||||
config = lib.mkIf cfg.enable {
|
config = lib.mkIf cfg.enable {
|
||||||
programs.less.enable = true;
|
programs.less = {
|
||||||
|
enable = true;
|
||||||
|
|
||||||
home.sessionVariables = {
|
envVariables = {
|
||||||
LESS = "-R";
|
LESS = "-R";
|
||||||
|
};
|
||||||
|
|
||||||
|
lessopen = "|${pkgs.lesspipe}/bin/lesspipe.sh %s";
|
||||||
};
|
};
|
||||||
|
|
||||||
programs.lesspipe.enable = true;
|
|
||||||
};
|
};
|
||||||
}
|
}
|
Loading…
Reference in a new issue