|
18 | 18 |
|
19 | 19 | outputs =
|
20 | 20 | inputs@{ self, flake-parts, ... }:
|
21 |
| - flake-parts.lib.mkFlake { inherit inputs; } ( |
22 |
| - { |
23 |
| - lib, |
24 |
| - ... |
25 |
| - }: |
26 |
| - { |
27 |
| - imports = |
28 |
| - [ |
29 |
| - ./devShells/flake-module.nix |
30 |
| - ./nixosModules/flake-module.nix |
31 |
| - ./checks/flake-module.nix |
32 |
| - ./packages/flake-module.nix |
33 |
| - ] |
34 |
| - ++ inputs.nixpkgs.lib.optional (inputs.treefmt-nix ? flakeModule) ./formatter/flake-module.nix |
35 |
| - ++ inputs.nixpkgs.lib.optionals (inputs.hercules-ci-effects ? flakeModule) [ |
36 |
| - inputs.hercules-ci-effects.flakeModule |
37 |
| - ./herculesCI/flake-module.nix |
38 |
| - ]; |
39 |
| - systems = [ |
40 |
| - "x86_64-linux" |
41 |
| - "aarch64-linux" |
42 |
| - "aarch64-darwin" |
| 21 | + flake-parts.lib.mkFlake { inherit inputs; } { |
| 22 | + imports = |
| 23 | + [ |
| 24 | + ./devShells/flake-module.nix |
| 25 | + ./nixosModules/flake-module.nix |
| 26 | + ./checks/flake-module.nix |
| 27 | + ./packages/flake-module.nix |
| 28 | + ] |
| 29 | + ++ inputs.nixpkgs.lib.optional (inputs.treefmt-nix ? flakeModule) ./formatter/flake-module.nix |
| 30 | + ++ inputs.nixpkgs.lib.optionals (inputs.hercules-ci-effects ? flakeModule) [ |
| 31 | + inputs.hercules-ci-effects.flakeModule |
| 32 | + ./herculesCI/flake-module.nix |
43 | 33 | ];
|
| 34 | + systems = [ |
| 35 | + "x86_64-linux" |
| 36 | + "aarch64-linux" |
| 37 | + "aarch64-darwin" |
| 38 | + ]; |
44 | 39 |
|
45 |
| - flake = { |
46 |
| - nixosConfigurations = |
47 |
| - let |
48 |
| - examplesFor = |
49 |
| - system: |
50 |
| - import ./examples { |
51 |
| - inherit system; |
52 |
| - inherit (inputs) nixpkgs; |
53 |
| - buildbot-nix = self; |
54 |
| - }; |
55 |
| - in |
56 |
| - examplesFor "x86_64-linux" // examplesFor "aarch64-linux"; |
57 |
| - |
58 |
| - }; |
59 |
| - perSystem = |
60 |
| - { |
61 |
| - self', |
62 |
| - system, |
63 |
| - ... |
64 |
| - }: |
65 |
| - { |
66 |
| - checks = |
67 |
| - let |
68 |
| - nixosMachines = lib.mapAttrs' ( |
69 |
| - name: config: lib.nameValuePair "nixos-${name}" config.config.system.build.toplevel |
70 |
| - ) ((lib.filterAttrs (name: _: lib.hasSuffix system name)) self.nixosConfigurations); |
71 |
| - packages = lib.mapAttrs' (n: lib.nameValuePair "package-${n}") self'.packages; |
72 |
| - devShells = lib.mapAttrs' (n: lib.nameValuePair "devShell-${n}") self'.devShells; |
73 |
| - in |
74 |
| - nixosMachines // packages // devShells; |
75 |
| - }; |
76 |
| - } |
77 |
| - ); |
| 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 | + }; |
| 53 | + }; |
78 | 54 | }
|
0 commit comments