From 64d72d811ca4310046692a5517f865788ef5fa55 Mon Sep 17 00:00:00 2001 From: Fabian Hauser Date: Tue, 10 Dec 2024 16:22:55 +0200 Subject: [PATCH 1/3] Add system nix configuration to container --- nixos-modules/qois/git-ci-runner/default.nix | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/nixos-modules/qois/git-ci-runner/default.nix b/nixos-modules/qois/git-ci-runner/default.nix index 6a8bb6c..ac53334 100644 --- a/nixos-modules/qois/git-ci-runner/default.nix +++ b/nixos-modules/qois/git-ci-runner/default.nix @@ -91,9 +91,10 @@ with lib; emptypassword='$6$1ero.LwbisiU.h3D$GGmnmECbPotJoPQ5eoSTD6tTjKnSWZcjHoVTkxFLZP17W9hRi/XkmCiAMOfWruUwy8gMjINrBMNODc7cYEo4K.' useradd --prefix $(pwd) -p "$emptypassword" -m -d /tmp -u "$userid" -g "$groupid" -G nixuser nixuser - cat < etc/nix/nix.conf + cp -a ${config.environment.etc."nix/nix.conf".source} etc/nix/nix.conf + + cat <> etc/nix/nix.conf accept-flake-config = true - experimental-features = nix-command flakes NIX_CONFIG cat < etc/nsswitch.conf From 3e6b507e6ac4d56068b1c62686740624a33d85ab Mon Sep 17 00:00:00 2001 From: Fabian Hauser Date: Tue, 10 Dec 2024 16:43:56 +0200 Subject: [PATCH 2/3] TMP --- .github/workflows/ci.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 67fabec..fb43f53 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -10,6 +10,10 @@ jobs: build: runs-on: nix steps: + - name: Debug + run: | + ls -lah /etc/nix/ + nix --version - name: Initialize CI uses: https://git.qo.is/qo.is/actions-nix-init@main with: From eaa5e6b1129ec88727420e525dd8c674b5342c0b Mon Sep 17 00:00:00 2001 From: Fabian Hauser Date: Tue, 10 Dec 2024 16:22:55 +0200 Subject: [PATCH 3/3] Add system nix configuration to git build container --- nixos-modules/qois/git-ci-runner/default.nix | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/nixos-modules/qois/git-ci-runner/default.nix b/nixos-modules/qois/git-ci-runner/default.nix index 6a8bb6c..ac53334 100644 --- a/nixos-modules/qois/git-ci-runner/default.nix +++ b/nixos-modules/qois/git-ci-runner/default.nix @@ -91,9 +91,10 @@ with lib; emptypassword='$6$1ero.LwbisiU.h3D$GGmnmECbPotJoPQ5eoSTD6tTjKnSWZcjHoVTkxFLZP17W9hRi/XkmCiAMOfWruUwy8gMjINrBMNODc7cYEo4K.' useradd --prefix $(pwd) -p "$emptypassword" -m -d /tmp -u "$userid" -g "$groupid" -G nixuser nixuser - cat < etc/nix/nix.conf + cp -a ${config.environment.etc."nix/nix.conf".source} etc/nix/nix.conf + + cat <> etc/nix/nix.conf accept-flake-config = true - experimental-features = nix-command flakes NIX_CONFIG cat < etc/nsswitch.conf