nix-community.nixvim/flake.nix

103 lines
2.7 KiB
Nix
Raw Normal View History

2020-12-30 01:05:51 +00:00
{
description = "A neovim configuration system for NixOS";
2021-11-02 15:04:12 +01:00
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
2020-12-30 01:05:51 +00:00
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;
};
2021-02-09 00:03:28 +00:00
nixosModules.nixvim = import ./nixvim.nix { nixos = true; };
homeManagerModules.nixvim = import ./nixvim.nix { homeManager = 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 = "";
};
2021-11-02 15:04:12 +01:00
imports = [ nixosModules.nixvim ];
2020-12-30 01:05:51 +00:00
programs.nixvim = {
enable = true;
2021-12-10 19:54:17 +00:00
package = pkgs.neovim;
2021-11-02 19:37:08 +00:00
colorschemes.tokyonight = { enable = true; };
2020-12-30 01:05:51 +00:00
2021-11-02 15:04:12 +01:00
extraPlugins = [ pkgs.vimPlugins.vim-nix ];
2021-03-17 21:50:35 +00:00
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-11-22 14:19:29 +00:00
maps.normal."<leader>m" = {
silent = true;
action = "<cmd>make<CR>";
};
2021-01-05 16:11:56 +00:00
2021-11-02 19:37:08 +00:00
plugins.lualine = {
2021-01-05 11:26:49 +00:00
enable = 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;
2021-11-02 15:04:12 +01:00
extensions = { frecency.enable = true; };
2021-03-17 21:50:35 +00:00
};
2021-11-02 15:04:12 +01:00
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
};
})
];
};
};
}