diff --git a/nixos/modules/programs/neovim.nix b/nixos/modules/programs/neovim.nix index 3f0e9fc173bd..1b53b9b5d919 100644 --- a/nixos/modules/programs/neovim.nix +++ b/nixos/modules/programs/neovim.nix @@ -138,7 +138,8 @@ in }; source = mkOption { - type = types.path; + default = null; + type = types.nullOr types.path; description = lib.mdDoc "Path of the source file."; }; @@ -160,9 +161,11 @@ in environment.etc = listToAttrs (attrValues (mapAttrs (name: value: { name = "xdg/nvim/${name}"; - value = value // { - target = "xdg/nvim/${value.target}"; - }; + value = removeAttrs + (value // { + target = "xdg/nvim/${value.target}"; + }) + (optionals (isNull value.source) [ "source" ]); }) cfg.runtime));