Skip to content

Commit eff28c8

Browse files
committed
devops: nix flake
1 parent dea1c4a commit eff28c8

File tree

5 files changed

+266
-0
lines changed

5 files changed

+266
-0
lines changed

.envrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
use flake

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
deps
2+
.direnv

.luarc.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/nix/store/pzl0ng6xixz28g7jalnml2aic07f8pa8-luarc.json

flake.lock

Lines changed: 222 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

flake.nix

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
{
2+
inputs = {
3+
nixpkgs.url = "github:NixOS/nixpkgs";
4+
flake-utils.url = "github:numtide/flake-utils";
5+
gen-luarc.url = "github:mrcjkb/nix-gen-luarc-json";
6+
};
7+
outputs =
8+
{
9+
nixpkgs,
10+
flake-utils,
11+
gen-luarc,
12+
...
13+
}:
14+
flake-utils.lib.eachDefaultSystem (
15+
system:
16+
let
17+
pkgs = import nixpkgs {
18+
inherit system;
19+
overlays = [
20+
gen-luarc.overlays.default
21+
];
22+
};
23+
luarc = pkgs.mk-luarc-json {
24+
plugins = with pkgs.vimPlugins; [
25+
mini-nvim
26+
];
27+
};
28+
in
29+
{
30+
devShells.default = pkgs.mkShell {
31+
packages = with pkgs; [
32+
lua-language-server
33+
];
34+
shellHook = # bash
35+
''
36+
ln -fs ${luarc} .luarc.json
37+
'';
38+
};
39+
}
40+
);
41+
}

0 commit comments

Comments
 (0)