{
  lib,
  config,
  fn,
  nvim-lazy,
  ...
}:

with lib;
{
  imports =
    [
      nvim-lazy.nixosModules.nvim-lazy
    ]
    ++ (fn.lst {
      path = (toString ./nvim);
      fullPath = true;
    });

  programs.nvim-lazy = mkIf (elem "nvim" config.machine.pkgs) {
    enable = true;
    luaRcContent = # lua
      ''
        vim.g.mapleader = " "
        vim.o.tabstop = 2
        vim.o.shiftwidth = 2
        vim.o.expandtab = true
        vim.o.ignorecase = true
        vim.o.smartcase = true
        vim.o.nrformats = alpha
        vim.bo.softtabstop = 2
        vim.wo.foldmethod = 'expr'
        vim.wo.foldexpr = 'nvim_treesitter#foldexpr()'
        vim.o.foldlevelstart = 99

        vim.wo.number = true
        vim.wo.relativenumber = true

        vim.o.scrolloff = 20
      '';
  };
}