forked from nix-community/nixvim
-
Notifications
You must be signed in to change notification settings - Fork 0
/
flake.nix
102 lines (83 loc) · 2.71 KB
/
flake.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
{
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;
};
})
];
};
};
}