Skip to content

Commit b384a05

Browse files
authored
Merge pull request #55 from input-output-hk/next-2024-12-03
Nixpkgs 24.11, nix 2.25.3, GHA for spinup
2 parents f2595eb + a403bab commit b384a05

File tree

17 files changed

+481
-174
lines changed

17 files changed

+481
-174
lines changed

.envrc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
if ! has nix_direnv_version || ! nix_direnv_version 3.0.3; then
2-
source_url "https://raw.githubusercontent.com/nix-community/nix-direnv/3.0.3/direnvrc" "sha256-0EVQVNSRQWsln+rgPW3mXVmnF5sfcmKEYOmOSfLYxHg="
1+
if ! has nix_direnv_version || ! nix_direnv_version 3.0.6; then
2+
source_url "https://raw.githubusercontent.com/nix-community/nix-direnv/3.0.6/direnvrc" "sha256-RYcUJaRMf8oF5LznDrlCXbkOQrywm0HDv1VjYGaJGdM="
33
fi
44

55
IGREEN='\e[0;92m'

.github/workflows/nix-jobs-test.yaml

Lines changed: 108 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,108 @@
1+
on:
2+
pull_request:
3+
4+
jobs:
5+
nix-jobs-test:
6+
name: "Test nix jobs"
7+
runs-on: ubuntu-latest
8+
steps:
9+
- name: Checkout
10+
uses: actions/checkout@v4
11+
with:
12+
ref: "${{github.head_ref || github.ref_name}}"
13+
- name: Install Nix
14+
uses: cachix/install-nix-action@v27
15+
with:
16+
extra_nix_config: |
17+
accept-flake-config = true
18+
experimental-features = fetch-closure flakes nix-command
19+
substituters = https://cache.iog.io https://cache.nixos.org/
20+
trusted-public-keys = hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ= cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
21+
- name: Test
22+
run: |
23+
nix --version
24+
25+
# Enable tracing
26+
export DEBUG="true"
27+
28+
# Default base paths
29+
export GENESIS_DIR="workbench"
30+
export KEY_DIR="workbench/envs/custom"
31+
export DATA_DIR="workbench/rundir"
32+
33+
# Fake testing UTxOs
34+
export BYRON_UTXO='{
35+
"txin":"1e6f026dfa9aa3deb43a7a4c64d9e002d3224ce707e2a4bb45b0a93e465a4e20#0",
36+
"address":"2657WMsDfac6yNxPyqZPCamHhH8pfYAaMgXFTxsag4n3ttWqVAz2gxRMomvJJMyF4",
37+
"amount":30000000000000000}'
38+
export UTXO='{
39+
"txin":"cde023e0da05739ebcfeb7ab3ffaa467fa38fb508eddcc2c10a78bf06ff23f2b#0",
40+
"address":"addr_test1vzyhu8wp6sx85dukujyuk0ltvqzjfx6vlpvwdf9dla9zg8qlez2ut",
41+
"amount":30000000000000000}'
42+
43+
# Fake testing epoch
44+
export EPOCH="100"
45+
46+
# Other params
47+
export BYRON_SIGNING_KEY="$KEY_DIR/utxo-keys/shelley.000.skey"
48+
export ERA_CMD="alonzo"
49+
export MAJOR_VERSION="7"
50+
export NUM_GENESIS_KEYS="3"
51+
export PAYMENT_KEY="$KEY_DIR/utxo-keys/rich-utxo"
52+
export POOL_NAMES="sp-1 sp-2 sp-3"
53+
export POOL_RELAY="test.local"
54+
export POOL_RELAY_PORT="3001"
55+
export STAKE_POOL_DIR="workbench/groups/stake-pools"
56+
export SUBMIT_TX="false"
57+
export TESTNET_MAGIC="42"
58+
export UNSTABLE="false"
59+
export UNSTABLE_LIB="false"
60+
export USE_ENCRYPTION="false"
61+
export USE_DECRYPTION="false"
62+
export USE_NODE_CONFIG_BP="false"
63+
64+
JOB_SEQ=(
65+
"job-gen-custom-node-config-data"
66+
"job-create-stake-pool-keys"
67+
"job-register-stake-pools"
68+
"job-delegate-rewards-stake-key"
69+
"job-update-proposal-hard-fork"
70+
)
71+
72+
JOB_SEQ_LEGACY=(
73+
"job-gen-custom-node-config"
74+
"job-create-stake-pool-keys"
75+
"job-move-genesis-utxo"
76+
"job-register-stake-pools"
77+
"job-delegate-rewards-stake-key"
78+
"job-update-proposal-hard-fork"
79+
)
80+
81+
RUN_TESTS() {
82+
local JOBS=("$@")
83+
84+
rm -rf workbench
85+
for i in ${JOBS[@]}; do
86+
echo "Running nix job .#$i"
87+
nix run ".#$i"
88+
done
89+
}
90+
91+
echo "Run nix job tests with release versioning..."
92+
echo "Running legacy sequence tests..."
93+
RUN_TESTS "${JOB_SEQ_LEGACY[@]}"
94+
95+
echo "Running sequence tests..."
96+
RUN_TESTS "${JOB_SEQ[@]}"
97+
98+
echo "Now run nix job tests again with pre-release versioning..."
99+
set -x
100+
export UNSTABLE="true"
101+
export UNSTABLE_LIB="true"
102+
set +x
103+
104+
echo "Running legacy sequence tests on pre-release..."
105+
RUN_TESTS "${JOB_SEQ_LEGACY[@]}"
106+
107+
echo "Running sequence tests on pre-release..."
108+
RUN_TESTS "${JOB_SEQ[@]}"

flake.lock

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

flake.nix

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
flake-parts.url = "github:hercules-ci/flake-parts";
1010
inputs-check.url = "github:input-output-hk/inputs-check";
1111
nixpkgs-unstable.url = "github:nixos/nixpkgs/nixpkgs-unstable";
12-
nixpkgs.url = "github:nixos/nixpkgs/nixos-24.05";
13-
nix.url = "github:nixos/nix/2.24-maintenance";
12+
nixpkgs.url = "github:nixos/nixpkgs/nixos-24.11";
13+
nix.url = "github:nixos/nix/2.25-maintenance";
1414
opentofu-registry = {
1515
url = "github:opentofu/registry";
1616
flake = false;
@@ -58,12 +58,12 @@
5858
};
5959

6060
cardano-node-service = {
61-
url = "github:IntersectMBO/cardano-node/jl/10.1.2-svc-legacy-tracing";
61+
url = "github:IntersectMBO/cardano-node";
6262
flake = false;
6363
};
6464

6565
cardano-node-service-ng = {
66-
url = "github:IntersectMBO/cardano-node/jl/10.1.2-svc-legacy-tracing";
66+
url = "github:IntersectMBO/cardano-node";
6767
flake = false;
6868
};
6969

flake/nixosModules/profile-basic.nix

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,8 @@
7272
# For nix >= 2.24 build compatibility
7373
inputs.nixpkgs-unstable.legacyPackages.${system}.neovim
7474
ncdu
75-
# Add a localFlake pin to avoid downstream repo nixpkgs pins <= 23.05 causing a non-existent pkg failure
76-
inputs.nixpkgs.legacyPackages.${system}.nushellFull
75+
# Add a localFlake pin to avoid downstream repo nixpkgs pins <= 24.11 causing missing features error
76+
inputs.nixpkgs.legacyPackages.${system}.nushell
7777
parted
7878
pciutils
7979
procps
@@ -89,10 +89,6 @@
8989
];
9090

9191
programs = {
92-
# Added to address openssh CVE-2024-6387
93-
# Remove on the next nixpkgs major version update so openssh 9.8p1+ version is maintained
94-
ssh.package = inputs.nixpkgs-unstable.legacyPackages.${system}.openssh;
95-
9692
tmux = {
9793
enable = true;
9894
aggressiveResize = true;

flake/nixosModules/profile-cardano-smash.nix

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -409,7 +409,7 @@ flake: {
409409
startLimitIntervalSec = 0;
410410
serviceConfig = {
411411
User = "registered-relays-dump";
412-
SupplementaryGroups = "cardano-node";
412+
SupplementaryGroups = ["cardano-node"];
413413
StateDirectory = "registered-relays-dump";
414414
Restart = "always";
415415
RestartSec = "30s";
@@ -602,7 +602,7 @@ flake: {
602602
systemd.services.nginx.serviceConfig = {
603603
LimitNOFILE = 65535;
604604
LogNamespace = "nginx";
605-
SupplementaryGroups = "registered-relays-dump";
605+
SupplementaryGroups = ["registered-relays-dump"];
606606
};
607607

608608
services.prometheus.exporters = {

flake/nixosModules/profile-common.nix

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@
2828
imports = [
2929
inputs.sops-nix.nixosModules.default
3030
inputs.auth-keys-hub.nixosModules.auth-keys-hub
31-
(inputs.nixpkgs-unstable.outPath + "/nixos/modules/services/monitoring/alloy.nix")
3231
];
3332

3433
programs = {

0 commit comments

Comments
 (0)