From a3696b88fc281fa988cfdfaf3ef19e2ae6f62bb3 Mon Sep 17 00:00:00 2001 From: Tamipes Date: Sat, 22 Aug 2026 18:39:01 +0200 Subject: [PATCH 1/5] feat: run `build.yml` on all branches --- .github/workflows/build.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d08fc82..d299a9d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -5,6 +5,7 @@ on: push: branches: - main + - "*" jobs: buildAndPush: From f1105d9ccbb5a4652a6b4bc706b5b74fd5f1adfb Mon Sep 17 00:00:00 2001 From: Tamipes Date: Sat, 12 Sep 2026 16:58:31 +0200 Subject: [PATCH 2/5] fix: forgot to add `#` in `nix build .#$NAME` --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d299a9d..5142be5 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -17,7 +17,7 @@ jobs: steps: - uses: actions/checkout@v4 - name: Nix build - run: nix build --extra-experimental-features "flakes nix-command" .${{matrix.containers}} + run: nix build --extra-experimental-features "flakes nix-command" .#${{matrix.containers}} - name: Setup skopeo run: curl -o /etc/containers/policy.json --create-dirs https://raw.githubusercontent.com/containers/skopeo/refs/heads/main/default-policy.json - name: Push Image From 7643d4f14a1972173ef7a87f50be227b78a9efcf Mon Sep 17 00:00:00 2001 From: Tamipes Date: Sat, 22 Aug 2026 18:48:55 +0200 Subject: [PATCH 3/5] feat: add `nix` as a package to `flake.nix` so the matrix works --- flake.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/flake.nix b/flake.nix index cdca942..3d56404 100644 --- a/flake.nix +++ b/flake.nix @@ -17,6 +17,7 @@ { packages.${system} = rec { default = nix-with-tools; + nix = nix-with-tools; minimal-nix = import (nix + "/docker.nix") { inherit pkgs; From 6c242c2a7552533538f6d795138c71f86c0c1aec Mon Sep 17 00:00:00 2001 From: Tamipes Date: Sat, 22 Aug 2026 18:52:57 +0200 Subject: [PATCH 4/5] fix: rename the input nix to `inputs.nix` --- flake.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/flake.nix b/flake.nix index 3d56404..a7c616c 100644 --- a/flake.nix +++ b/flake.nix @@ -8,7 +8,7 @@ inputs.nixpkgs.follows = "nixpkgs"; }; }; - outputs = { nixpkgs, nix, self, ... }@inputs: + outputs = { nixpkgs, ... }@inputs: let system = "x86_64-linux"; pkgs = import nixpkgs { inherit system; }; @@ -19,7 +19,7 @@ default = nix-with-tools; nix = nix-with-tools; - minimal-nix = import (nix + "/docker.nix") { + minimal-nix = import (inputs.nix + "/docker.nix") { inherit pkgs; extraPkgs = [ pkgs.nodejs pkgs.busybox ]; @@ -31,7 +31,7 @@ "org.opencontainers.image.description" = "Nix container image with nodejs"; }; }; - nix-with-tools = import (nix + "/docker.nix") { + nix-with-tools = import (inputs.nix + "/docker.nix") { inherit pkgs; extraPkgs = [ pkgs.nodejs From 4e83bf9761382490fe81e8ff7fc7c41dc1be54dc Mon Sep 17 00:00:00 2001 From: Tamipes Date: Sat, 22 Aug 2026 20:25:22 +0200 Subject: [PATCH 5/5] feat: `nix-host` updates - set up minimal fhs - use root, things work with it - add cache note - correct ordering of `PATH` --- flake.nix | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/flake.nix b/flake.nix index a7c616c..9480db0 100644 --- a/flake.nix +++ b/flake.nix @@ -64,25 +64,29 @@ tag = "latest"; runAsRoot = '' - ${dockerTools.shadowSetup} - useradd -m -s /run/current-system/sw/bin/bash docker-ci + mkdir /etc + # ${pkgs.shadow}/bin/useradd -m -s /run/current-system/sw/bin/bash docker-ci + + chmod 777 /tmp + mkdir -p /var/tmp + chmod 777 /var/tmp ''; # volumes to mount # -v /nix:/nix:ro # -v /run/current-system:/run/current-system + # -v /var/cache/docker-ci:/.cache # -v ${pkgs.buildEnv ... }:/run/container-env config = { Entrypoint = [ "/run/current-system/sw/bin/bash" ]; - User = "1000:1000"; + # User = "1000:1000"; Env = [ "NIX_REMOTE=daemon" "PATH=${lib.concatStringsSep ":" [ - "/run/current-system/sw/bin" - "/run/current-system/sw/sbin" - "/run/container-env/bin" - # "/run/container-env/sbin" # This might not be needed - ]}" + "/run/container-env/bin" + "/run/current-system/sw/bin" + "/run/current-system/sw/sbin" + ]}" "SSL_CERT_FILE=/run/current-system/etc/ssl/certs/ca-bundle.crt" "GIT_SSL_CAINFO=/run/current-system/etc/ssl/certs/ca-bundle.crt"