diff --git a/nixos/modules/misc/mandoc.nix b/nixos/modules/misc/mandoc.nix index e24ddc6bdd9d..73646a60aabb 100644 --- a/nixos/modules/misc/mandoc.nix +++ b/nixos/modules/misc/mandoc.nix @@ -190,7 +190,7 @@ in ''; # tell mandoc the paths containing man pages - profileRelativeSessionVariables."MANPATH" = map (path: "/${path}") cfg.manPath; + profileRelativeSessionVariables."MANPATH" = map (path: if builtins.substring 0 1 path != "/" then "/${path}" else path) cfg.manPath; }; }; }