-
-
Notifications
You must be signed in to change notification settings - Fork 104
/
Copy pathflake.nix
99 lines (81 loc) · 2.79 KB
/
flake.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
{
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.11-small";
inputs.agenix.url = "github:ryantm/agenix";
inputs.agenix.inputs.nixpkgs.follows = "nixpkgs";
inputs.colmena.url = "github:zhaofengli/colmena";
inputs.colmena.inputs.nixpkgs.follows = "nixpkgs";
inputs.disko.url = "github:nix-community/disko";
inputs.disko.inputs.nixpkgs.follows = "nixpkgs";
inputs.hydra.url = "github:NixOS/hydra/nix-2.19";
inputs.nix.follows = "hydra/nix";
inputs.hydra-scale-equinix-metal.url = "github:DeterminateSystems/hydra-scale-equinix-metal";
inputs.nix-netboot-serve.url = "github:DeterminateSystems/nix-netboot-serve";
inputs.nixos-channel-scripts.url = "github:NixOS/nixos-channel-scripts";
inputs.nixos-channel-scripts.inputs.nixpkgs.follows = "nixpkgs";
inputs.rfc39.url = "github:NixOS/rfc39";
inputs.rfc39.inputs.nixpkgs.follows = "nixpkgs";
outputs = flakes @ { self, agenix, colmena, disko, hydra, hydra-scale-equinix-metal, nix, nixpkgs, nixos-channel-scripts, nix-netboot-serve, rfc39 }:
let
inherit (nixpkgs) lib;
flakesModule = {
imports = [
agenix.nixosModules.age
disko.nixosModules.disko
hydra.nixosModules.hydra
hydra-scale-equinix-metal.nixosModules.default
nix-netboot-serve.nixosModules.nix-netboot-serve
];
nixpkgs.overlays = [
nix.overlays.default
nixos-channel-scripts.overlays.default
rfc39.overlays.default
];
};
in {
nixosConfigurations.haumea = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
flakesModule
./haumea
];
};
nixosConfigurations.pluto = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
flakesModule
./pluto
];
};
nixosConfigurations.rhea = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
flakesModule
./rhea/configuration.nix
];
};
colmena = {
meta = {
description = "NixOS.org infrastructure";
nixpkgs = import nixpkgs {
system = "x86_64-linux";
};
};
} // builtins.mapAttrs
(name: value: {
nixpkgs.system = value.config.nixpkgs.system;
imports = value._module.args.modules;
deployment = {
targetHost = "${name}.nixos.org";
};
}) (self.nixosConfigurations);
# TODO: flake-utils.lib.eachDefaultSystem
devShell.x86_64-linux = let
pkgs = import nixpkgs { system = "x86_64-linux"; };
in pkgs.mkShell {
buildInputs = with pkgs; [
agenix.packages.x86_64-linux.agenix
colmena.packages.x86_64-linux.colmena
];
};
};
}