mirror of
https://github.com/Gerg-L/nixos.git
synced 2025-12-10 00:43:56 -05:00
I don't know if i like this
This commit is contained in:
parent
c6a9144ffe
commit
1b62d16ddc
63 changed files with 369 additions and 294 deletions
23
nixosModules/page.nix
Normal file
23
nixosModules/page.nix
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
{ pkgs, config }:
|
||||
{
|
||||
systemd.tmpfiles.rules = [ "d /tmp/neovim-page 0777 root root - -" ];
|
||||
|
||||
environment = {
|
||||
systemPackages = [ pkgs.page ];
|
||||
variables = {
|
||||
PAGER = "page -WC -q 90000 -z 90000";
|
||||
SYSTEMD_PAGERSECURE = "true";
|
||||
MANPAGER = "page -t man";
|
||||
};
|
||||
shellAliases.page = config.environment.variables.PAGER;
|
||||
};
|
||||
|
||||
programs.zsh.interactiveShellInit = ''
|
||||
man () {
|
||||
PROGRAM="''${@[-1]}"
|
||||
SECTION="''${@[-2]}"
|
||||
page -W "man://$PROGRAM''${SECTION:+($SECTION)}"
|
||||
}
|
||||
'';
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue