From 8c58d785c7cfdceb8353964751efaf09613a5c1d Mon Sep 17 00:00:00 2001 From: Techassi Date: Wed, 7 May 2025 10:11:24 +0200 Subject: [PATCH 1/4] ci(template): Install Nix in pre-commit workflow --- config/versions.yaml | 4 ++++ template/.github/workflows/pr_pre-commit.yaml.j2 | 3 +++ 2 files changed, 7 insertions(+) diff --git a/config/versions.yaml b/config/versions.yaml index b99dfc7a..a85b8563 100644 --- a/config/versions.yaml +++ b/config/versions.yaml @@ -23,3 +23,7 @@ hadolint_version: v2.12.0 # If you change the Python version here, make sure to also change it in # .github/workflows/pr_pre-commit.yml python_version: 3.12 + +# This Nix version is used in the operators pre-commit workflow as they require +# Nix to ron some checks. +nix_pkg_manager_version: 2.28.3 diff --git a/template/.github/workflows/pr_pre-commit.yaml.j2 b/template/.github/workflows/pr_pre-commit.yaml.j2 index 2ce38c74..f1ccac91 100644 --- a/template/.github/workflows/pr_pre-commit.yaml.j2 +++ b/template/.github/workflows/pr_pre-commit.yaml.j2 @@ -6,6 +6,7 @@ on: env: CARGO_TERM_COLOR: always + NIX_PKG_MANAGER_VERSION: "{[ nix_pkg_manager_version }]" RUST_TOOLCHAIN_VERSION: "{[ rust_nightly_version }]" HADOLINT_VERSION: "{[ hadolint_version }]" PYTHON_VERSION: "{[ python_version }]" @@ -29,3 +30,5 @@ jobs: python-version: ${{ env.PYTHON_VERSION }} rust: ${{ env.RUST_TOOLCHAIN_VERSION }} hadolint: ${{ env.HADOLINT_VERSION }} + nix: ${{ env.NIX_PKG_MANAGER_VERSION }} + nix-github-token: ${{ secrets.GITHUB_TOKEN }} From acb78d849ebc7e09e48930b34315b8be31123771 Mon Sep 17 00:00:00 2001 From: Nick <10092581+NickLarsenNZ@users.noreply.github.com> Date: Wed, 7 May 2025 10:23:02 +0200 Subject: [PATCH 2/4] Apply suggestions from code review --- config/versions.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/versions.yaml b/config/versions.yaml index a85b8563..bc4a9b65 100644 --- a/config/versions.yaml +++ b/config/versions.yaml @@ -25,5 +25,5 @@ hadolint_version: v2.12.0 python_version: 3.12 # This Nix version is used in the operators pre-commit workflow as they require -# Nix to ron some checks. +# Nix to run some checks. nix_pkg_manager_version: 2.28.3 From 8a6d32b4cda3f95899161b1ef86b14c925a020d9 Mon Sep 17 00:00:00 2001 From: Techassi Date: Wed, 7 May 2025 10:32:50 +0200 Subject: [PATCH 3/4] chore: Extend comment about Nix version --- config/versions.yaml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/config/versions.yaml b/config/versions.yaml index bc4a9b65..2adcbd0b 100644 --- a/config/versions.yaml +++ b/config/versions.yaml @@ -25,5 +25,9 @@ hadolint_version: v2.12.0 python_version: 3.12 # This Nix version is used in the operators pre-commit workflow as they require -# Nix to run some checks. +# Nix to run some checks. Places to check for versions: +# - https://github.com/NixOS/nix/tags +# - https://nixos.org/download/# +# Usually the latest version should just work and as such the version here can +# be bumped without any constraints. nix_pkg_manager_version: 2.28.3 From c87e1bfe5fee34469ea495a1a64aa490bf831de0 Mon Sep 17 00:00:00 2001 From: Nick <10092581+NickLarsenNZ@users.noreply.github.com> Date: Wed, 7 May 2025 10:37:00 +0200 Subject: [PATCH 4/4] Apply suggestions from code review --- config/versions.yaml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/config/versions.yaml b/config/versions.yaml index 2adcbd0b..35ff68d7 100644 --- a/config/versions.yaml +++ b/config/versions.yaml @@ -25,9 +25,8 @@ hadolint_version: v2.12.0 python_version: 3.12 # This Nix version is used in the operators pre-commit workflow as they require -# Nix to run some checks. Places to check for versions: -# - https://github.com/NixOS/nix/tags -# - https://nixos.org/download/# +# Nix to run some checks. Check for new versions here: +# https://github.com/NixOS/nix/tags # Usually the latest version should just work and as such the version here can # be bumped without any constraints. nix_pkg_manager_version: 2.28.3