feat: setup nvim with a bunch of random plugins #68

Merged
chef merged 1 commit from nixvim-config into main 2024-07-31 09:03:57 +00:00
4 changed files with 258 additions and 32 deletions
Showing only changes of commit 7c785e0473 - Show all commits

View file

@ -49,6 +49,26 @@
"type": "github" "type": "github"
} }
}, },
"devshell": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1722113426,
"narHash": "sha256-Yo/3loq572A8Su6aY5GP56knpuKYRvM2a1meP9oJZCw=",
"owner": "numtide",
"repo": "devshell",
"rev": "67cce7359e4cd3c45296fb4aaf6a19e2a9c757ae",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "devshell",
"type": "github"
}
},
"disko": { "disko": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
@ -70,7 +90,6 @@
} }
}, },
"flake-compat": { "flake-compat": {
"flake": false,
"locked": { "locked": {
"lastModified": 1696426674, "lastModified": 1696426674,
"narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=", "narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=",
@ -85,6 +104,27 @@
"type": "github" "type": "github"
} }
}, },
"flake-parts": {
"inputs": {
"nixpkgs-lib": [
"nixvim",
"nixpkgs"
]
},
"locked": {
"lastModified": 1719994518,
"narHash": "sha256-pQMhCCHyQGRzdfAkdJ4cIWiw+JNuWsTX7f0ZYSyz0VY=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "9227223f6d922fee3c7b190b2cc238a99527bbb7",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "flake-parts",
"type": "github"
}
},
"flake-utils": { "flake-utils": {
"inputs": { "inputs": {
"systems": [ "systems": [
@ -120,10 +160,37 @@
"type": "github" "type": "github"
} }
}, },
"git-hooks": {
"inputs": {
"flake-compat": [
"flake-compat"
],
"gitignore": "gitignore",
"nixpkgs": [
"nixpkgs-unstable"
],
"nixpkgs-stable": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1721042469,
"narHash": "sha256-6FPUl7HVtvRHCCBQne7Ylp4p+dpP3P/OYuzjztZ4s70=",
"owner": "cachix",
"repo": "git-hooks.nix",
"rev": "f451c19376071a90d8c58ab1a953c6e9840527fd",
"type": "github"
},
"original": {
"owner": "cachix",
"repo": "git-hooks.nix",
"type": "github"
}
},
"gitignore": { "gitignore": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
"pre-commit-hooks", "git-hooks",
"nixpkgs" "nixpkgs"
] ]
}, },
@ -199,6 +266,27 @@
"url": "https://git.lix.systems/lix-project/nixos-module/archive/2.90.0.tar.gz" "url": "https://git.lix.systems/lix-project/nixos-module/archive/2.90.0.tar.gz"
} }
}, },
"nix-darwin": {
"inputs": {
"nixpkgs": [
"nixvim",
"nixpkgs"
]
},
"locked": {
"lastModified": 1720845312,
"narHash": "sha256-yPhAsJTpyoIPQZJGC8Fw8W2lAXyhLoTn+HP20bmfkfk=",
"owner": "lnl7",
"repo": "nix-darwin",
"rev": "5ce8503cf402cf76b203eba4b7e402bea8e44abc",
"type": "github"
},
"original": {
"owner": "lnl7",
"repo": "nix-darwin",
"type": "github"
}
},
"nix-index-database": { "nix-index-database": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
@ -266,6 +354,42 @@
"type": "github" "type": "github"
} }
}, },
"nixvim": {
"inputs": {
"devshell": [
"devshell"
],
"flake-compat": [
"flake-compat"
],
"flake-parts": "flake-parts",
"git-hooks": [
"git-hooks"
],
"home-manager": [
"home-manager"
],
"nix-darwin": "nix-darwin",
"nixpkgs": [
"nixpkgs"
],
"treefmt-nix": "treefmt-nix"
},
"locked": {
"lastModified": 1721045803,
"narHash": "sha256-dQGvOK+t45unF7DTp5bfO37hY0NkDUw6X3MH5CCTEAs=",
"owner": "nix-community",
"repo": "nixvim",
"rev": "eef2f4c6b190d92e296e47e5fe10e7ced65fd959",
"type": "github"
},
"original": {
"owner": "nix-community",
"ref": "nixos-24.05",
"repo": "nixvim",
"type": "github"
}
},
"nur": { "nur": {
"locked": { "locked": {
"lastModified": 1722249943, "lastModified": 1722249943,
@ -281,44 +405,22 @@
"type": "github" "type": "github"
} }
}, },
"pre-commit-hooks": {
"inputs": {
"flake-compat": "flake-compat",
"gitignore": "gitignore",
"nixpkgs": [
"nixpkgs-unstable"
],
"nixpkgs-stable": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1721042469,
"narHash": "sha256-6FPUl7HVtvRHCCBQne7Ylp4p+dpP3P/OYuzjztZ4s70=",
"owner": "cachix",
"repo": "pre-commit-hooks.nix",
"rev": "f451c19376071a90d8c58ab1a953c6e9840527fd",
"type": "github"
},
"original": {
"owner": "cachix",
"repo": "pre-commit-hooks.nix",
"type": "github"
}
},
"root": { "root": {
"inputs": { "inputs": {
"agenix": "agenix", "agenix": "agenix",
"devshell": "devshell",
"disko": "disko", "disko": "disko",
"flake-compat": "flake-compat",
"flake-utils": "flake-utils", "flake-utils": "flake-utils",
"git-hooks": "git-hooks",
"home-manager": "home-manager", "home-manager": "home-manager",
"lix-module": "lix-module", "lix-module": "lix-module",
"nix-index-database": "nix-index-database", "nix-index-database": "nix-index-database",
"nixos-hardware": "nixos-hardware", "nixos-hardware": "nixos-hardware",
"nixpkgs": "nixpkgs", "nixpkgs": "nixpkgs",
"nixpkgs-unstable": "nixpkgs-unstable", "nixpkgs-unstable": "nixpkgs-unstable",
"nixvim": "nixvim",
"nur": "nur", "nur": "nur",
"pre-commit-hooks": "pre-commit-hooks",
"systems": "systems" "systems": "systems"
} }
}, },
@ -337,6 +439,27 @@
"repo": "default", "repo": "default",
"type": "github" "type": "github"
} }
},
"treefmt-nix": {
"inputs": {
"nixpkgs": [
"nixvim",
"nixpkgs"
]
},
"locked": {
"lastModified": 1720818892,
"narHash": "sha256-f52x9srIcqQm1Df3T+xYR5P6VfdnDFa2vkkcLhlTp6U=",
"owner": "numtide",
"repo": "treefmt-nix",
"rev": "5b002f8a53ed04c1a4177e7b00809d57bd2c696f",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "treefmt-nix",
"type": "github"
}
} }
}, },
"root": "root", "root": "root",

View file

@ -12,6 +12,7 @@
}; };
inputs = { inputs = {
flake-compat.url = "github:edolstra/flake-compat";
nixos-hardware.url = "github:NixOS/nixos-hardware"; nixos-hardware.url = "github:NixOS/nixos-hardware";
nixpkgs-unstable.url = "github:NixOS/nixpkgs/nixos-unstable"; nixpkgs-unstable.url = "github:NixOS/nixpkgs/nixos-unstable";
nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.05"; nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.05";
@ -26,6 +27,14 @@
}; };
}; };
devshell = {
url = "github:numtide/devshell";
inputs = {
flake-utils.follows = "flake-utils";
nixpkgs.follows = "nixpkgs";
};
};
disko = { disko = {
url = "github:nix-community/disko"; url = "github:nix-community/disko";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
@ -54,9 +63,21 @@
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
pre-commit-hooks = { nixvim = {
url = "github:cachix/pre-commit-hooks.nix"; url = "github:nix-community/nixvim/nixos-24.05";
inputs = { inputs = {
devshell.follows = "devshell";
flake-compat.follows = "flake-compat";
git-hooks.follows = "git-hooks";
home-manager.follows = "home-manager";
nixpkgs.follows = "nixpkgs";
};
};
git-hooks = {
url = "github:cachix/git-hooks.nix";
inputs = {
flake-compat.follows = "flake-compat";
nixpkgs.follows = "nixpkgs-unstable"; nixpkgs.follows = "nixpkgs-unstable";
nixpkgs-stable.follows = "nixpkgs"; nixpkgs-stable.follows = "nixpkgs";
}; };
@ -73,7 +94,7 @@
flake-utils, flake-utils,
nixpkgs, nixpkgs,
nixpkgs-unstable, nixpkgs-unstable,
pre-commit-hooks, git-hooks,
... ...
} @ args: let } @ args: let
makeSystem = system: config: makeSystem = system: config:
@ -98,7 +119,7 @@
} }
// flake-utils.lib.eachDefaultSystem (system: { // flake-utils.lib.eachDefaultSystem (system: {
checks = { checks = {
pre-commit-check = pre-commit-hooks.lib.${system}.run { pre-commit-check = git-hooks.lib.${system}.run {
src = ./.; src = ./.;
hooks = { hooks = {
alejandra.enable = true; alejandra.enable = true;

View file

@ -13,6 +13,7 @@
./git.nix ./git.nix
./ime.nix ./ime.nix
./mako.nix ./mako.nix
./nixvim.nix
./nvd.nix ./nvd.nix
./ssh.nix ./ssh.nix
./sway.nix ./sway.nix

81
users/buffet/nixvim.nix Normal file
View file

@ -0,0 +1,81 @@
{
pkgs,
nixvim,
...
}: {
home-manager.users.buffet = {
imports = [
nixvim.homeManagerModules.nixvim
];
programs.nixvim = {
enable = true;
colorschemes.ayu.enable = true;
plugins = {
cmp.enable = true;
cmp-async-path.enable = true;
cmp-buffer.enable = true;
cmp-calc.enable = true;
cmp-conventionalcommits.enable = true;
cmp-emoji.enable = true;
cmp-nvim-lsp.enable = true;
cmp-pandoc-nvim.enable = true;
crates-nvim.enable = true;
fugitive.enable = true;
gitsigns = {
enable = true;
settings.current_line_blame = true;
};
lsp = {
enable = true;
servers = {
clangd.enable = true;
nil-ls.enable = true;
pyright.enable = true;
rust-analyzer = {
enable = true;
installCargo = true;
installRustc = true;
cargoPackage = pkgs.unstable.cargo;
rustcPackage = pkgs.unstable.rustc;
};
};
};
lualine.enable = true;
nix.enable = true;
noice.enable = true;
oil.enable = true;
parinfer-rust.enable = true;
persistence.enable = true;
rust-tools.enable = true;
startify.enable = true;
telescope = {
enable = true;
extensions = {
fzf-native = {
enable = true;
};
};
};
treesitter.enable = true;
};
keymaps = [
{
action = "<cmd>Telescope find_files<cr>";
key = "<space>f";
mode = "n";
options = {
silent = true;
};
}
{
action = "<esc>";
key = "kj";
mode = "i";
}
];
};
};
}