Skip to content

Commit a506b5a

Browse files
committed
Flake updates
1 parent ec6702c commit a506b5a

File tree

1 file changed

+18
-11
lines changed

1 file changed

+18
-11
lines changed

flake.nix

+18-11
Original file line numberDiff line numberDiff line change
@@ -13,33 +13,37 @@
1313
};
1414

1515
outputs = {
16-
nixpkgs,
1716
nixvim,
1817
flake-parts,
1918
pre-commit-hooks,
2019
...
2120
} @ inputs:
2221
flake-parts.lib.mkFlake {inherit inputs;} {
23-
systems = ["aarch64-linux" "x86_64-linux" "aarch64-darwin" "x86_64-darwin"];
22+
systems = [
23+
"aarch64-linux"
24+
"x86_64-linux"
25+
"aarch64-darwin"
26+
"x86_64-darwin"
27+
];
2428

2529
perSystem = {
26-
system,
2730
pkgs,
28-
self',
29-
lib,
31+
system,
3032
...
3133
}: let
34+
nixvimLib = nixvim.lib.${system};
3235
nixvim' = nixvim.legacyPackages.${system};
33-
nvim = nixvim'.makeNixvimWithModule {
36+
nixvimModule = {
3437
inherit pkgs;
3538
module = ./config;
39+
extraSpecialArgs = {
40+
# inherit (inputs) foo;
41+
};
3642
};
43+
nvim = nixvim'.makeNixvimWithModule nixvimModule;
3744
in {
3845
checks = {
39-
default = pkgs.nixvimLib.check.mkTestDerivationFromNvim {
40-
inherit nvim;
41-
name = "A nixvim configuration";
42-
};
46+
default = nixvimLib.check.mkTestDerivationFromNixvimModule nixvimModule;
4347
pre-commit-check = pre-commit-hooks.lib.${system}.run {
4448
src = ./.;
4549
hooks = {
@@ -51,7 +55,10 @@
5155

5256
formatter = pkgs.alejandra;
5357

54-
packages.default = nvim;
58+
packages = {
59+
# Lets you run `nix run .` to start nixvim
60+
default = nvim;
61+
};
5562

5663
devShells = {
5764
default = with pkgs;

0 commit comments

Comments
 (0)