Skip to content

Commit 17ad906

Browse files
committed
bump: mods required for nixpkgs 22.11 and nix 2.12 bump
1 parent b8adfd8 commit 17ad906

File tree

16 files changed

+736
-2053
lines changed

16 files changed

+736
-2053
lines changed

flake.lock

Lines changed: 634 additions & 1957 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

flake.nix

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,17 @@
55
n2c.follows = "std/n2c";
66
data-merge.follows = "std/dmerge";
77
# --- Bitte Stack ----------------------------------------------
8-
bitte.url = "github:input-output-hk/bitte/equinix";
9-
# bitte.url = "path:/home/jlotoski/work/iohk/bitte-wt/equinix";
8+
bitte.url = "github:input-output-hk/bitte/equinix-2211";
9+
# bitte.url = "path:/home/jlotoski/work/iohk/bitte-wt/equinix-2211";
1010
# bitte.url = "path:/home/manveru/github/input-output-hk/bitte";
1111
bitte-cells.url = "github:input-output-hk/bitte-cells/patroni-token-rotation";
1212
# bitte-cells.url = "path:/home/jlotoski/work/iohk/bitte-cells-wt/bitte-cells";
13-
bitte.inputs.nomad-driver-nix.follows = "nomad-driver-nix";
1413
bitte.inputs.nomad-follower.url = "github:input-output-hk/nomad-follower/3ff1d80324a3a716f008fbfc970a0e836c5b34db";
14+
bitte.inputs.capsules.follows = "capsules";
1515
# --------------------------------------------------------------
1616
# --- Auxiliary Nixpkgs ----------------------------------------
17-
nixpkgs.url = "github:NixOS/nixpkgs";
18-
nixpkgs-nix.url = "github:NixOS/nixpkgs";
17+
nixpkgs.follows = "bitte/nixpkgs";
18+
nix.follows = "bitte/nix";
1919
capsules = {
2020
# Until nixago is implemented, as HEAD currently removes fmt hooks
2121
url = "github:input-output-hk/devshell-capsules/8dcf0e917848abbe58c58fc5d49069c32cd2f585";
@@ -26,16 +26,15 @@
2626
nix-inclusive.url = "github:input-output-hk/nix-inclusive";
2727
nixpkgs-postgrest.url = "github:NixOS/nixpkgs/haskell-updates";
2828
nixpkgs-vector.url = "github:NixOS/nixpkgs/30d3d79b7d3607d56546dd2a6b49e156ba0ec634";
29-
nomad-driver-nix.url = "github:input-output-hk/nomad-driver-nix";
3029
spongix.url = "github:input-output-hk/spongix/extract-gc";
3130
spongix.inputs.cicero.follows = "cicero";
3231
spongix-nar-proxy.url = "github:input-output-hk/spongix/nar-proxy";
3332
spongix-nar-proxy.inputs.cicero.follows = "cicero";
3433
cicero.url = "github:input-output-hk/cicero";
3534
cicero.inputs.spongix.follows = "spongix";
36-
cicero.inputs.driver.follows = "nomad-driver-nix";
3735
tullia.url = "github:input-output-hk/tullia";
3836
openziti.url = "github:johnalotoski/openziti-bins";
37+
# openziti.url = "path:/home/jlotoski/work/johnalotoski/openziti-bins-wt/openziti-bins";
3938
openziti.inputs.nixpkgs.follows = "nixpkgs";
4039
deploy-rs.url = "github:serokell/deploy-rs";
4140
# --------------------------------------------------------------

nix/automation/devshells.nix

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,15 @@ in {
4747
capsules.base
4848
capsules.cloud
4949
];
50+
commands = let
51+
withCategory = category: attrset: attrset // {inherit category;};
52+
ciWorld = withCategory "ci-world";
53+
in
54+
with nixpkgs; [
55+
(ciWorld {package = lib.hiPrio bitte.legacyPackages.${system}.consul;})
56+
(ciWorld {package = lib.hiPrio bitte.legacyPackages.${system}.nomad;})
57+
(ciWorld {package = lib.hiPrio bitte.legacyPackages.${system}.vault-bin;})
58+
];
5059
};
5160
ops = dev.mkShell {
5261
imports = [

nix/metal/bitteProfile/buildkite/buildkite-agent-containers.nix

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -127,9 +127,7 @@ in
127127
hostAddress = hostIp;
128128
localAddress = guestIp;
129129

130-
config = let
131-
inherit (self.inputs.nixpkgs-nix.legacyPackages.x86_64-linux.nixVersions) nix_2_12;
132-
in {
130+
config = {
133131
imports = [
134132
# Common guest level config (also applied at host level)
135133
./common.nix
@@ -156,13 +154,12 @@ in
156154

157155
# services.monitoring-exporters.enable = false;
158156

157+
# Set the state version to the current nixpkgs being used to avoid trace warns
158+
system.stateVersion = lib.mkDefault config.system.nixos.release;
159+
159160
# Ensure we can use same nixpkgs with overlays the host uses
160161
nixpkgs.pkgs = pkgs;
161162

162-
# Ensure nix package on buildkite matches darwin buildkite at 2.12.0
163-
nix.package = nix_2_12;
164-
environment.systemPackages = [nix_2_12];
165-
166163
# Don't try to inherit resolved from the equinix host which won't work
167164
environment.etc."resolv.conf".text = ''
168165
nameserver 8.8.8.8

nix/metal/bitteProfile/buildkite/common.nix

Lines changed: 29 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ in {
2424
lsof
2525
ncdu
2626
sysstat
27-
sqliteInteractive
27+
sqlite-interactive
2828
tcpdump
2929
tig
3030
tree
@@ -61,35 +61,40 @@ in {
6161
cron.enable = true;
6262
};
6363

64-
nix = lib.mkForce rec {
64+
nix = lib.mkForce {
6565
# Use nix sandboxing for greater determinism
66-
useSandbox = true;
66+
settings = rec {
67+
sandbox = true;
68+
sandbox-fallback = false;
6769

68-
# Make sure we have enough build users
69-
nrBuildUsers = 64;
70+
max-jobs = "auto";
7071

71-
# If our cache is down, don't wait forever
72-
extraOptions = ''
73-
max-jobs = auto
74-
connect-timeout = 10
75-
http2 = true
76-
show-trace = true
77-
experimental-features = nix-command flakes
78-
allow-import-from-derivation = true
79-
'';
72+
# Use all cores
73+
cores = 0;
8074

81-
# Use all cores
82-
buildCores = 0;
75+
# If our cache is down, don't wait forever
76+
connect-timeout = 10;
8377

84-
nixPath = ["nixpkgs=/run/current-system/nixpkgs"];
78+
# Use our binary cache builds
79+
trusted-substituters = ["https://cache.nixos.org" "https://cache.iog.io"];
80+
substituters = trusted-substituters;
81+
trusted-public-keys = [
82+
"cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="
83+
"hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ="
84+
];
85+
86+
system-features = ["kvm" "big-parallel" "nixos-test" "benchmark"];
87+
88+
http2 = true;
89+
show-trace = true;
90+
experimental-features = "nix-command flakes";
91+
allow-import-from-derivation = true;
92+
};
8593

86-
# Use our binary cache builds
87-
trustedBinaryCaches = ["https://cache.nixos.org" "https://cache.iog.io"];
88-
binaryCaches = trustedBinaryCaches;
89-
binaryCachePublicKeys = [
90-
"cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="
91-
"hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ="
92-
];
94+
# Make sure we have enough build users
95+
nrBuildUsers = 64;
96+
97+
nixPath = ["nixpkgs=/run/current-system/nixpkgs"];
9398
};
9499

95100
system.extraSystemBuilderCmds =
Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
{lib, ...}: {
2-
nix = {
3-
# To avoid build problems in containers
4-
sandboxPaths = ["/etc/nsswitch.conf" "/etc/protocols"];
2+
nix = lib.mkForce {
3+
settings = {
4+
# To avoid build problems in containers
5+
extra-sandbox-paths = ["/etc/nsswitch.conf" "/etc/protocols"];
56

6-
# To avoid interactive prompts on flake nix config declarations
7-
extraOptions = lib.mkForce ''
8-
accept-flake-config = true
9-
'';
7+
# To avoid interactive prompts on flake nix config declarations
8+
accept-flake-config = true;
9+
};
1010
};
1111
}

nix/metal/bitteProfile/cache.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@
66
inputs.bitte.profiles.vault-cache
77
inputs.bitte.profiles.auxiliaries-builder
88
];
9-
nix.systemFeatures = ["big-parallel"];
9+
nix.settings.system-features = ["big-parallel"];
1010
}

nix/metal/bitteProfile/default.nix

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -506,13 +506,12 @@ in {
506506
})
507507
];
508508

509-
buildkiteOnly = queue: count: [
509+
buildkiteOnly = hostIdSuffix: queue: count: [
510510
({
511511
lib,
512512
config,
513513
...
514514
}: let
515-
inherit (self.inputs.nixpkgs-nix.legacyPackages.x86_64-linux.nixVersions) nix_2_12;
516515
cfg = config.services.buildkite-containers;
517516
in {
518517
# Temporarily disable nomad to avoid conflict with buildkite resource consumption.
@@ -533,6 +532,8 @@ in {
533532
};
534533

535534
services.buildkite-containers = {
535+
inherit hostIdSuffix;
536+
536537
# There should be enough space on these machines to cache dir purges.
537538
weeklyCachePurge = false;
538539

@@ -549,28 +550,24 @@ in {
549550
in
550551
map (n: mkContainer n (toString (10 - n))) (lib.range 1 count);
551552
};
552-
553-
# Ensure nix package on buildkite matches darwin buildkite at 2.12.0
554-
nix.package = nix_2_12;
555-
environment.systemPackages = [nix_2_12];
556553
})
557554
];
558555

559-
mkEquinixBuildkite = name: privateIP: queue: count: {
556+
mkEquinixBuildkite = name: hostIdSuffix: privateIP: queue: count: {
560557
inherit deployType node_class primaryInterface role privateIP;
561558
equinix = {inherit plan project;};
562559

563560
modules =
564561
baseEquinixModuleConfig
565562
++ (baseEquinixMachineConfig name)
566-
++ (buildkiteOnly queue count)
563+
++ (buildkiteOnly hostIdSuffix queue count)
567564
++ [./buildkite/buildkite-agent-containers.nix];
568565
};
569566
in {
570-
equinix-1 = mkEquinixBuildkite "equinix-1" "10.12.10.1" "default" 5;
571-
equinix-2 = mkEquinixBuildkite "equinix-2" "10.12.10.3" "default" 5;
572-
equinix-3 = mkEquinixBuildkite "equinix-3" "10.12.10.5" "benchmark" 1;
573-
equinix-4 = mkEquinixBuildkite "equinix-4" "10.12.10.7" "benchmark" 1;
567+
equinix-1 = mkEquinixBuildkite "equinix-1" "1" "10.12.10.1" "default" 5;
568+
equinix-2 = mkEquinixBuildkite "equinix-2" "2" "10.12.10.3" "default" 5;
569+
equinix-3 = mkEquinixBuildkite "equinix-3" "3" "10.12.10.5" "benchmark" 1;
570+
equinix-4 = mkEquinixBuildkite "equinix-4" "4" "10.12.10.7" "benchmark" 1;
574571
};
575572
};
576573
};

nix/metal/bitteProfile/equinix/equinix-1/packet/system.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
systemd-boot.enable = true;
2828
efi.canTouchEfiVariables = true;
2929
};
30-
nix.maxJobs = lib.mkDefault 64;
30+
nix.settings.max-jobs = lib.mkDefault 64;
3131
}
3232
)
3333
{

nix/metal/bitteProfile/equinix/equinix-2/packet/system.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
systemd-boot.enable = true;
2828
efi.canTouchEfiVariables = true;
2929
};
30-
nix.maxJobs = lib.mkDefault 64;
30+
nix.settings.max-jobs = lib.mkDefault 64;
3131
}
3232
)
3333
{

0 commit comments

Comments
 (0)