-
Notifications
You must be signed in to change notification settings - Fork 0
/
default.nix
67 lines (53 loc) · 1.71 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
{ config, pkgs, lib, ... }: {
programs.neovim = {
enable = true;
package = pkgs.neovim-unwrapped;
# Install the required packages that were previously in extraPackages
extraPackages = with pkgs; [
# NVChad Requirements
gcc
nodejs
lua5_1
lua-language-server
ripgrep
tree-sitter
git
# PHP/Laravel Development
nodePackages.intelephense
phpactor
# Web Development
nodePackages.typescript-language-server
nodePackages.vscode-langservers-extracted
tailwindcss-language-server
# nodePackages.vtsls
# waiting for one or the other
# - https://github.com/NixOS/nixpkgs/pull/319501
# - https://github.com/NixOS/nixpkgs/pull/347284
# Formatters
nodePackages.prettier
stylua
php83Packages.php-cs-fixer
nixfmt
# pint -- this one use ./vendor/bin/pint
# Additional useful tools
fd
# Other LSP
nixd
rust-analyzer
];
};
# Clone my nvim configuration with write access when not already present.
home.activation = {
cloneNvimConfig = lib.hm.dag.entryAfter [ "writeBoundary" ] ''
nvimConfigPath="${config.home.homeDirectory}/.config/nvim"
# Check if nvim directory exists and has a git repo
if [ ! -d "$nvimConfigPath" ] || [ ! -d "$nvimConfigPath/.git" ]; then
# Clone the repository
$DRY_RUN_CMD ${pkgs.git}/bin/git clone \
--config core.sshCommand="${pkgs.openssh}/bin/ssh -i ${config.home.homeDirectory}/.ssh/id_rsa" \
git@github.com:cbaconnier/nvim.git "$nvimConfigPath"
$DRY_RUN_CMD chmod -R u+w "${config.home.homeDirectory}/.config/nvim"
fi
'';
};
}