From e8083473e49bdba2e135abef7bcc6589b117b083 Mon Sep 17 00:00:00 2001 From: punkfairie Date: Sat, 16 Nov 2024 18:29:01 -0800 Subject: [PATCH] feat(home): Man --- homes/x86_64-linux/marley@nyx/default.nix | 1 + modules/home/programs/man/default.nix | 25 +++++++++++++++++++++++ old/home/programs/man.nix | 9 -------- 3 files changed, 26 insertions(+), 9 deletions(-) create mode 100644 modules/home/programs/man/default.nix delete mode 100644 old/home/programs/man.nix diff --git a/homes/x86_64-linux/marley@nyx/default.nix b/homes/x86_64-linux/marley@nyx/default.nix index 9864127..b74b2f7 100644 --- a/homes/x86_64-linux/marley@nyx/default.nix +++ b/homes/x86_64-linux/marley@nyx/default.nix @@ -33,6 +33,7 @@ in just = enabled; lazygit = enabled; less = enabled; + man = enabled; neo = enabled; systemctl = enabled; }; diff --git a/modules/home/programs/man/default.nix b/modules/home/programs/man/default.nix new file mode 100644 index 0000000..ac7ff91 --- /dev/null +++ b/modules/home/programs/man/default.nix @@ -0,0 +1,25 @@ +{ + lib, + config, + namespace, + ... +}: +let + inherit (lib) mkIf; + inherit (lib.${namespace}) mkEnableModule; + + cfg = config.${namespace}.programs.man; +in +{ + options = mkEnableModule "programs.man"; + + config = mkIf cfg.enable { + programs.man.enable = true; + + home.sessionVariables = { + MANWIDTH = "80"; + # TODO: Only set this is nvim is installed. Also install plugin here? + MANPAGER = "nvim +NoNeckPain '+set nowrap' +Man!"; + }; + }; +} diff --git a/old/home/programs/man.nix b/old/home/programs/man.nix deleted file mode 100644 index 9be3a67..0000000 --- a/old/home/programs/man.nix +++ /dev/null @@ -1,9 +0,0 @@ -{ ... }: -{ - programs.man.enable = true; - - home.sessionVariables = { - MANWIDTH = "80"; - MANPAGER = "nvim +NoNeckPain '+set nowrap' +Man!"; - }; -}