Skip to content

Commit a5c9953

Browse files
committedDec 15, 2024··
docs: fix example
1 parent 73365a9 commit a5c9953

File tree

1 file changed

+39
-42
lines changed

1 file changed

+39
-42
lines changed
 

‎readme.md

+39-42
Original file line numberDiff line numberDiff line change
@@ -125,46 +125,43 @@ Multi-directory flake:
125125
# ./flake.nix
126126
127127
{
128-
inputs = {
129-
nixpkgs.url = "github:nixos/nixpkgs/release-24.05";
130-
unstable.url = "github:nixos/nixpkgs/nixos-unstable";
131-
132-
parts.url = "github:hercules-ci/flake-parts";
133-
parts.inputs.nixpkgs-lib.follows = "nixpkgs";
134-
135-
systems.url = "github:nix-systems/default";
136-
137-
autopilot.url = "github:stepbrobd/autopilot";
138-
autopilot.inputs.nixpkgs.follows = "nixpkgs";
139-
autopilot.inputs.parts.follows = "parts";
140-
autopilot.inputs.systems.follows = "systems";
128+
inputs = {
129+
nixpkgs.url = "github:nixos/nixpkgs/release-24.05";
130+
unstable.url = "github:nixos/nixpkgs/nixos-unstable";
131+
parts.url = "github:hercules-ci/flake-parts";
132+
parts.inputs.nixpkgs-lib.follows = "nixpkgs";
133+
systems.url = "github:nix-systems/default";
134+
autopilot.url = "github:stepbrobd/autopilot";
135+
autopilot.inputs.nixpkgs.follows = "nixpkgs";
136+
autopilot.inputs.parts.follows = "parts";
137+
autopilot.inputs.systems.follows = "systems";
138+
};
139+
140+
outputs = inputs: inputs.autopilot.lib.mkFlake
141+
{
142+
inherit inputs;
143+
144+
autopilot = {
145+
lib = {
146+
path = ./lib;
147+
excludes = [ ];
148+
extender = inputs.nixpkgs.lib;
149+
extensions = with inputs; [ autopilot.lib parts.lib ];
150+
};
151+
152+
nixpkgs = {
153+
config = { allowUnfree = true; };
154+
overlays = [ ];
155+
instances = [
156+
{ pkgs = inputs.nixpkgs; }
157+
{ unstable = inputs.unstable; }
158+
];
159+
};
160+
161+
parts = { path = ./parts; excludes = [ ]; };
141162
};
142-
143-
outputs = inputs: inputs.autopilot.lib.mkFlake
144-
{
145-
inherit inputs;
146-
147-
autopilot = {
148-
lib = {
149-
path = ./lib;
150-
excludes = [ ];
151-
extender = inputs.nixpkgs.lib;
152-
extensions = with inputs; [ autopilot.lib parts.lib ];
153-
};
154-
155-
nixpkgs = {
156-
config = { allowUnfree = true; };
157-
overlays = [ ];
158-
instances = [
159-
{ name = "pkgs"; value = inputs.nixpkgs; }
160-
{ name = "unstable"; value = inputs.unstable; }
161-
];
162-
};
163-
164-
parts = { path = ./parts; excludes = [ ]; };
165-
};
166-
}
167-
{ systems = import inputs.systems; };
163+
}
164+
{ systems = import inputs.systems; };
168165
}
169166
```
170167

@@ -180,9 +177,9 @@ x: x + 1
180177
# ./parts/formatter.nix
181178
182179
{
183-
perSystem = { unstable, ... }: {
184-
formatter = unstable.nixpkgs-fmt;
185-
};
180+
perSystem = { unstable, ... }: {
181+
formatter = unstable.nixpkgs-fmt;
182+
};
186183
}
187184
```
188185

0 commit comments

Comments
 (0)
Please sign in to comment.