nix-community.nixvim/flake.nix

110 lines
2.8 KiB
Nix
Raw Normal View History

2020-12-30 01:05:51 +00:00
{
description = "A neovim configuration system for NixOS";
inputs.nixpkgs.url = github:NixOS/nixpkgs/nixos-unstable;
inputs.neovim-nightly.url = github:nix-community/neovim-nightly-overlay;
outputs = { self, nixpkgs, ... }@inputs: rec {
overlays = [
inputs.neovim-nightly.overlay
];
2021-02-09 00:03:28 +00:00
nixosModules.nixvim = import ./nixvim.nix { nixos = true; };
homeManagerModules.nixvim = import ./nixvim.nix { homeManager = true; };
nixOnDroidModules.nixvim = import ./nixvim.nix { nixOnDroid = true; };
2020-12-30 01:05:51 +00:00
# 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
];
nixpkgs.overlays = [ inputs.neovim-nightly.overlay ];
programs.nixvim = {
enable = true;
package = pkgs.neovim-nightly;
2021-03-17 22:44:10 +00:00
colorschemes.onedark = {
2021-01-17 22:15:54 +00:00
enable = true;
};
2020-12-30 01:05:51 +00:00
2021-03-17 21:50:35 +00:00
extraPlugins = [
pkgs.vimPlugins.vim-nix
];
2021-03-18 14:03:17 +00:00
options = {
number = true;
mouse = "a";
tabstop = 2;
shiftwidth = 2;
expandtab = true;
smarttab = true;
autoindent = true;
cindent = true;
linebreak = true;
hidden = true;
};
2021-01-05 11:26:49 +00:00
2021-01-05 16:11:56 +00:00
maps.normalVisualOp."ç" = ":";
2021-01-05 11:26:49 +00:00
plugins.airline = {
enable = true;
powerline = true;
};
2021-01-07 16:06:39 +00:00
2021-02-10 15:09:31 +00:00
plugins.undotree.enable = true;
2021-01-07 16:06:39 +00:00
plugins.gitgutter.enable = true;
2021-03-17 22:38:50 +00:00
plugins.fugitive.enable = true;
2021-02-10 15:17:21 +00:00
plugins.commentary.enable = true;
2021-02-11 15:24:00 +00:00
plugins.startify = {
enable = true;
useUnicode = true;
};
2021-02-11 15:35:38 +00:00
plugins.goyo = {
enable = true;
showLineNumbers = true;
};
2021-02-01 15:54:53 +00:00
plugins.lsp = {
enable = true;
servers.clangd.enable = true;
};
2021-02-01 16:40:07 +00:00
2021-03-17 21:50:35 +00:00
plugins.telescope = {
enable = true;
extensions = {
frecency.enable = true;
};
};
plugins.nvim-autopairs = {
enable = true;
};
2021-02-10 20:56:21 +00:00
globals = {
vimsyn_embed = "l";
mapleader = " ";
};
plugins.lspsaga.enable = true;
2021-02-01 16:40:07 +00:00
plugins.treesitter.enable = true;
2021-03-18 10:03:55 +00:00
plugins.ledger.enable = true;
2020-12-30 01:05:51 +00:00
};
})
];
};
};
}