forked from ryan4yin/nix-config
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdefault.nix
74 lines (67 loc) · 2.5 KB
/
default.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
{
config,
lib,
pkgs,
pkgs-unstable,
...
}:
###############################################################################
#
# AstroNvim's configuration and all its dependencies(lsp, formatter, etc.)
#
#e#############################################################################
let
shellAliases = {
v = "nvim";
vdiff = "nvim -d";
};
# the path to nvim directory
# to make this symlink work, we need to git clone this repo to your home directory.
configPath = "${config.home.homeDirectory}/nix-config/home/base/tui/editors/neovim/nvim";
in {
xdg.configFile."nvim".source = config.lib.file.mkOutOfStoreSymlink configPath;
home.shellAliases = shellAliases;
programs.nushell.shellAliases = shellAliases;
programs = {
neovim = {
enable = true;
package = pkgs-unstable.neovim-unwrapped;
# defaultEditor = true;
viAlias = true;
vimAlias = true;
# These environment variables are needed to build and run binaries
# with external package managers like mason.nvim.
#
# LD_LIBRARY_PATH is also needed to run the non-FHS binaries downloaded by mason.nvim.
# it will be set by nix-ld, so we do not need to set it here again.
extraWrapperArgs = with pkgs; [
# LIBRARY_PATH is used by gcc before compilation to search directories
# containing static and shared libraries that need to be linked to your program.
"--suffix"
"LIBRARY_PATH"
":"
"${lib.makeLibraryPath [stdenv.cc.cc zlib]}"
# PKG_CONFIG_PATH is used by pkg-config before compilation to search directories
# containing .pc files that describe the libraries that need to be linked to your program.
"--suffix"
"PKG_CONFIG_PATH"
":"
"${lib.makeSearchPathOutput "dev" "lib/pkgconfig" [stdenv.cc.cc zlib]}"
];
# Currently we use lazy.nvim as neovim's package manager, so comment this one.
#
# NOTE: These plugins will not be used by astronvim by default!
# We should install packages that will compile locally or download FHS binaries via Nix!
# and use lazy.nvim's `dir` option to specify the package directory in nix store.
# so that these plugins can work on NixOS.
#
# related project:
# https://github.com/b-src/lazy-nix-helper.nvim
plugins = with pkgs.vimPlugins; [
# search all the plugins using https://search.nixos.org/packages
telescope-fzf-native-nvim
nvim-treesitter.withAllGrammars
];
};
};
}