Skip to content

Commit 1d86794

Browse files
committed
move examples out of flake.nix
1 parent 0a73474 commit 1d86794

File tree

2 files changed

+19
-14
lines changed

2 files changed

+19
-14
lines changed

examples/flake-module.nix

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{ self, inputs, ... }:
2+
{
3+
flake = {
4+
nixosConfigurations =
5+
let
6+
examplesFor =
7+
system:
8+
import ../examples {
9+
inherit system;
10+
inherit (inputs) nixpkgs;
11+
buildbot-nix = self;
12+
};
13+
in
14+
examplesFor "x86_64-linux" // examplesFor "aarch64-linux";
15+
};
16+
}

flake.nix

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,11 @@
1717
};
1818

1919
outputs =
20-
inputs@{ self, flake-parts, ... }:
20+
inputs@{ flake-parts, ... }:
2121
flake-parts.lib.mkFlake { inherit inputs; } {
2222
imports =
2323
[
24+
./examples/flake-module.nix
2425
./devShells/flake-module.nix
2526
./nixosModules/flake-module.nix
2627
./checks/flake-module.nix
@@ -31,24 +32,12 @@
3132
inputs.hercules-ci-effects.flakeModule
3233
./herculesCI/flake-module.nix
3334
];
35+
3436
systems = [
3537
"x86_64-linux"
3638
"aarch64-linux"
3739
"aarch64-darwin"
3840
];
3941

40-
flake = {
41-
nixosConfigurations =
42-
let
43-
examplesFor =
44-
system:
45-
import ./examples {
46-
inherit system;
47-
inherit (inputs) nixpkgs;
48-
buildbot-nix = self;
49-
};
50-
in
51-
examplesFor "x86_64-linux" // examplesFor "aarch64-linux";
52-
};
5342
};
5443
}

0 commit comments

Comments
 (0)