Skip to content

Commit 797c075

Browse files
elythhGaetanLepage
authored andcommitted
readme: fix & simplify simple flake example
1 parent 99a2f96 commit 797c075

File tree

1 file changed

+26
-25
lines changed

1 file changed

+26
-25
lines changed

README.md

Lines changed: 26 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -203,38 +203,39 @@ can use the following:
203203
{
204204
description = "A very basic flake";
205205
206-
inputs.nixvim.url = "github:nix-community/nixvim";
207-
208-
outputs = {
209-
self,
210-
nixvim,
211-
flake-parts,
212-
} @ inputs: let
213-
config = {
214-
colorschemes.gruvbox.enable = true;
215-
};
216-
in
217-
flake-parts.lib.mkFlake {inherit inputs;} {
206+
inputs = {
207+
nixpkgs.follows = "nixvim/nixpkgs";
208+
nixvim.url = "github:nix-community/nixvim";
209+
};
210+
211+
outputs =
212+
{ nixpkgs, nixvim, ... }:
213+
let
214+
config = {
215+
colorschemes.gruvbox.enable = true;
216+
};
217+
218218
systems = [
219-
"aarch64-darwin"
219+
"x86_64-linux"
220220
"aarch64-linux"
221221
"x86_64-darwin"
222-
"x86_64-linux"
222+
"aarch64-darwin"
223223
];
224224
225-
perSystem = {
226-
pkgs,
227-
system,
228-
...
229-
}: let
230-
nixvim' = nixvim.legacyPackages."${system}";
231-
nvim = nixvim'.makeNixvim config;
232-
in {
233-
packages = {
225+
forAllSystems = nixpkgs.lib.genAttrs systems;
226+
in
227+
{
228+
packages = forAllSystems (
229+
system:
230+
let
231+
nixvim' = nixvim.legacyPackages.${system};
232+
nvim = nixvim'.makeNixvim config;
233+
in
234+
{
234235
inherit nvim;
235236
default = nvim;
236-
};
237-
};
237+
}
238+
);
238239
};
239240
}
240241
```

0 commit comments

Comments
 (0)