File tree Expand file tree Collapse file tree 5 files changed +52
-47
lines changed Expand file tree Collapse file tree 5 files changed +52
-47
lines changed Original file line number Diff line number Diff line change 1
1
{
2
2
inputs = {
3
- flake-utils . url = "github:numtide/flake-utils" ;
4
3
nixpkgs . url = "github:NixOS/nixpkgs/nixos-unstable" ;
5
4
nix-topology . url = "github:oddlama/nix-topology" ;
6
5
nix-topology . inputs . nixpkgs . follows = "nixpkgs" ;
10
9
self ,
11
10
nixpkgs ,
12
11
nix-topology ,
13
- flake-utils ,
14
12
...
15
- } :
13
+ } : let
14
+ inherit ( nixpkgs ) lib ;
15
+
16
+ eachSystem = systems : fn :
17
+ lib . foldl' (
18
+ acc : system : lib . recursiveUpdate acc ( lib . mapAttrs ( _ : value : { ${ system } = value ; } ) ( fn system ) )
19
+ ) { }
20
+ systems ;
21
+
22
+ systems = [
23
+ "aarch64-darwin"
24
+ "aarch64-linux"
25
+ "x86_64-darwin"
26
+ "x86_64-linux"
27
+ ] ;
28
+ in
16
29
{
17
30
nixosConfigurations . host1 = nixpkgs . lib . nixosSystem {
18
31
system = "x86_64-linux" ;
174
187
] ;
175
188
} ;
176
189
}
177
- // flake-utils . lib . eachDefaultSystem ( system : rec {
190
+ // eachSystem systems ( system : rec {
178
191
pkgs = import nixpkgs {
179
192
inherit system ;
180
193
overlays = [ nix-topology . overlays . default ] ;
Original file line number Diff line number Diff line change 1
1
{
2
2
inputs = {
3
- flake-utils . url = "github:numtide/flake-utils" ;
4
3
nixpkgs . url = "github:NixOS/nixpkgs/nixos-unstable" ;
5
4
nix-topology . url = "github:oddlama/nix-topology" ;
6
5
nix-topology . inputs . nixpkgs . follows = "nixpkgs" ;
10
9
self ,
11
10
nixpkgs ,
12
11
nix-topology ,
13
- flake-utils ,
14
12
...
15
- } :
13
+ } : let
14
+ inherit ( nixpkgs ) lib ;
15
+
16
+ eachSystem = systems : fn :
17
+ lib . foldl' (
18
+ acc : system : lib . recursiveUpdate acc ( lib . mapAttrs ( _ : value : { ${ system } = value ; } ) ( fn system ) )
19
+ ) { }
20
+ systems ;
21
+
22
+ systems = [
23
+ "aarch64-darwin"
24
+ "aarch64-linux"
25
+ "x86_64-darwin"
26
+ "x86_64-linux"
27
+ ] ;
28
+ in
16
29
{
17
30
nixosConfigurations . host1 = nixpkgs . lib . nixosSystem {
18
31
system = "x86_64-linux" ;
97
110
] ;
98
111
} ;
99
112
}
100
- // flake-utils . lib . eachDefaultSystem ( system : rec {
113
+ // eachSystem systems ( system : rec {
101
114
pkgs = import nixpkgs {
102
115
inherit system ;
103
116
overlays = [ nix-topology . overlays . default ] ;
Original file line number Diff line number Diff line change 7
7
inputs . nixpkgs . follows = "nixpkgs" ;
8
8
} ;
9
9
10
- flake-utils . url = "github:numtide/flake-utils" ;
11
10
nixpkgs . url = "github:NixOS/nixpkgs/nixos-unstable" ;
12
11
13
12
pre-commit-hooks = {
20
19
outputs = {
21
20
self ,
22
21
devshell ,
23
- flake-utils ,
24
22
nixpkgs ,
25
23
pre-commit-hooks ,
26
24
...
27
- } @ inputs :
25
+ } @ inputs : let
26
+ inherit ( nixpkgs ) lib ;
27
+
28
+ eachSystem = systems : fn :
29
+ lib . foldl' (
30
+ acc : system : lib . recursiveUpdate acc ( lib . mapAttrs ( _ : value : { ${ system } = value ; } ) ( fn system ) )
31
+ ) { }
32
+ systems ;
33
+
34
+ systems = [
35
+ "aarch64-darwin"
36
+ "aarch64-linux"
37
+ "x86_64-darwin"
38
+ "x86_64-linux"
39
+ ] ;
40
+ in
28
41
{
29
42
flakeModule = ./flake-module.nix ;
30
43
36
49
overlays . default = self . overlays . topology ;
37
50
overlays . topology = import ./pkgs/default.nix ;
38
51
}
39
- // flake-utils . lib . eachDefaultSystem ( system : rec {
52
+ // eachSystem systems ( system : rec {
40
53
pkgs = import nixpkgs {
41
54
inherit system ;
42
55
overlays = [
Original file line number Diff line number Diff line change 39
39
40
40
flakeForExample = path : let
41
41
self = ( import ( path + "/flake.nix" ) ) . outputs {
42
- inherit ( flakeInputs ) nixpkgs flake-utils ;
42
+ inherit ( flakeInputs ) nixpkgs ;
43
43
inherit self ;
44
44
nix-topology = flakeOutputs // { outPath = ./.. ; } ;
45
45
} ;
You can’t perform that action at this time.
0 commit comments