nix-community.nixvim/flake.nix
Pedro Alves eef84178ab docs: Add basic documentation system based on nmd
You can now run `nix build '.#docs'` to build HTML documentation
documenting every single option on nixvim! Fortunately, thanks to
the 'description' field, most options are already documented, but
there are still a fair few that need documenting.

I will be taking care of those in the next few days. When those are
done, I will find a way to automatically rebuild documentation on every
repo push, and also add a PR hook requiring documentation.

Additionally, I will try to find a way to have per-page plugin docs.
2022-01-12 01:44:51 +00:00

102 lines
2.7 KiB
Nix

{
description = "A neovim configuration system for NixOS";
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
inputs.nmdSrc.url = "gitlab:rycee/nmd";
inputs.nmdSrc.flake = false;
outputs = { self, nixpkgs, nmdSrc, ... }@inputs: rec {
packages."x86_64-linux".docs = import ./docs {
pkgs = import nixpkgs { system = "x86_64-linux"; };
lib = nixpkgs.lib;
};
nixosModules.nixvim = import ./nixvim.nix { nixos = true; };
homeManagerModules.nixvim = import ./nixvim.nix { homeManager = true; };
# This is a simple container for testing
nixosConfigurations.container = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
({ pkgs, ... }: {
boot.isContainer = true;
system.configurationRevision = nixpkgs.lib.mkIf (self ? rev) self.rev;
users.users.test = {
isNormalUser = true;
password = "";
};
imports = [ nixosModules.nixvim ];
programs.nixvim = {
enable = true;
package = pkgs.neovim;
colorschemes.tokyonight = { enable = true; };
extraPlugins = [ pkgs.vimPlugins.vim-nix ];
options = {
number = true;
mouse = "a";
tabstop = 2;
shiftwidth = 2;
expandtab = true;
smarttab = true;
autoindent = true;
cindent = true;
linebreak = true;
hidden = true;
};
maps.normalVisualOp."ç" = ":";
maps.normal."<leader>m" = {
silent = true;
action = "<cmd>make<CR>";
};
plugins.lualine = {
enable = true;
};
plugins.undotree.enable = true;
plugins.gitgutter.enable = true;
plugins.fugitive.enable = true;
plugins.commentary.enable = true;
plugins.startify = {
enable = true;
useUnicode = true;
};
plugins.goyo = {
enable = true;
showLineNumbers = true;
};
plugins.lsp = {
enable = true;
servers.clangd.enable = true;
};
plugins.telescope = {
enable = true;
extensions = { frecency.enable = true; };
};
plugins.nvim-autopairs = { enable = true; };
globals = {
vimsyn_embed = "l";
mapleader = " ";
};
plugins.lspsaga.enable = true;
plugins.treesitter.enable = true;
plugins.ledger.enable = true;
};
})
];
};
};
}