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;
|
||||
jq = enabled;
|
||||
just = enabled;
|
||||
less = enabled;
|
||||
nh = enabled;
|
||||
};
|
||||
}
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
./journalctl.nix
|
||||
./jq.nix
|
||||
./just.nix
|
||||
./less.nix
|
||||
./nemo.nix
|
||||
./nh.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;
|
||||
fish = enabled;
|
||||
jq = enabled;
|
||||
less = enabled;
|
||||
nh = enabled;
|
||||
};
|
||||
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
./curl.nix
|
||||
./fish.nix
|
||||
./jq.nix
|
||||
./less.nix
|
||||
./nh.nix
|
||||
./waybar.nix
|
||||
];
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
{
|
||||
lib,
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
cfg = config.marleyos.programs.less;
|
||||
|
@ -8,12 +9,14 @@ in {
|
|||
options.marleyos.programs.less.enable = lib.mkEnableOption "less";
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
programs.less.enable = true;
|
||||
programs.less = {
|
||||
enable = true;
|
||||
|
||||
home.sessionVariables = {
|
||||
LESS = "-R";
|
||||
envVariables = {
|
||||
LESS = "-R";
|
||||
};
|
||||
|
||||
lessopen = "|${pkgs.lesspipe}/bin/lesspipe.sh %s";
|
||||
};
|
||||
|
||||
programs.lesspipe.enable = true;
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue