-
-
Notifications
You must be signed in to change notification settings - Fork 10
/
flake.nix
124 lines (106 loc) · 3.25 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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
{
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable-small";
nix-netboot-serve = {
url = "github:DeterminateSystems/nix-netboot-serve";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = { self, nixpkgs, nix-netboot-serve }:
let
mkNixOS = system: module:
(nixpkgs.lib.nixosSystem {
inherit system;
modules = [
nix-netboot-serve.nixosModules.no-filesystem
nix-netboot-serve.nixosModules.register-nix-store
./modules/swap-to-disk.nix
./modules/tmpfs-root.nix
module
./modules/user.nix
./modules/services.nix
./modules/nix.nix
./modules/system.nix
{
system.stateVersion = "24.05";
nix = {
gbFree = 100;
features = [ "kvm" "nixos-test" ];
};
}
];
}).config.system.build.toplevel;
in
rec {
devShells.x86_64-linux.default = let
pkgs = import nixpkgs {
system = "x86_64-linux";
config.allowUnfree = true; # vault
};
in pkgs.mkShell {
buildInputs = [
pkgs.awscli
pkgs.bashInteractive
pkgs.curl
pkgs.gawk
pkgs.gnused
pkgs.jq
pkgs.openssh
pkgs.vault
(pkgs.terraform_1.withPlugins (p: [ p.metal ]))
];
};
nixosConfigurations.c3-medium-x86 = mkNixOS "x86_64-linux" {
imports = [ ./instances/c3.medium.x86.nix ];
nix = {
systemTypes = [ "x86_64-linux" "i686-linux" ];
settings.max-jobs = 24;
settings.cores = 2;
};
};
nixosConfigurations.c3-medium-x86--big-parallel = mkNixOS "x86_64-linux" {
imports = [ ./instances/c3.medium.x86.nix ];
nix = {
features = [ "big-parallel" ];
systemTypes = [ "x86_64-linux" "i686-linux" ];
settings.max-jobs = 2;
settings.cores = 24;
};
};
nixosConfigurations.m3-large-x86 = mkNixOS "x86_64-linux" {
imports = [ ./instances/m3.large.x86.nix ];
nix = {
systemTypes = [ "x86_64-linux" "i686-linux" ];
settings.max-jobs = 32;
settings.cores = 2;
};
};
nixosConfigurations.m3-large-x86--big-parallel = mkNixOS "x86_64-linux" {
imports = [ ./instances/m3.large.x86.nix ];
nix = {
features = [ "big-parallel" ];
systemTypes = [ "x86_64-linux" "i686-linux" ];
settings.max-jobs = 2;
settings.cores = 32;
};
};
nixosConfigurations.c3-large-arm = mkNixOS "aarch64-linux" {
imports = [ ./instances/c3.large.arm.nix ];
nix = {
systemTypes = [ "aarch64-linux" ];
settings.max-jobs = 40;
settings.cores = 2;
};
};
nixosConfigurations.c3-large-arm--big-parallel = mkNixOS "aarch64-linux" {
imports = [ ./instances/c3.large.arm.nix ];
nix = {
features = [ "big-parallel" ];
systemTypes = [ "aarch64-linux" ];
settings.max-jobs = 4;
settings.cores = 80;
};
};
hydraJobs = nixosConfigurations;
};
}