Gitlab runner with containerized daemon

Has anybody a working example of a Gitlab runner with a containerized Nix daemon as demonstrated in:
https://nixos.wiki/wiki/Gitlab_runner

Sadly this file is quite outdated. And the current settings in nixos-unstable function differently.
Does anybody know if this setup like:

{
  config,
  lib,
  pkgs,
  inputs,
  ...
}:
let
  localNix = import (inputs.nix.outPath + "/docker.nix") {
    pkgs = pkgs;
    name = "local/nix";
    tag = "latest";
    bundleNixpkgs = false;
    extraPkgs = with pkgs; [ cachix ];
    nixConf = {
      cores = "0";
      experimental-features = [
        "nix-command"
        "flakes"
      ];
    };
  };

  localNixDaemon = pkgs.dockerTools.buildLayeredImage {
    fromImage = localNix;
    name = "local/nix-daemon";
    tag = "latest";
    config = {
      Volumes = {
        "/nix/store" = { };
        "/nix/var/nix/db" = { };
        "/nix/var/nix/daemon-socket" = { };
      };
    };
    maxLayers = 125;
  };
in
{
  virtualisation.docker = {
    enable = true;
    autoPrune = {
      enable = true;
      dates = "daily";
    };
  };

  # Common container for the Gitlab Nix runner
  virtualisation.oci-containers = {
    backend = "docker";
    containers.gitlabnix = {
      imageFile = localNixDaemon;
      image = "local/nix-daemon:latest";
      cmd = [
        "nix"
        "daemon"
      ];
    };
  };

}

# Now define the Gitlab Runner here... 

I came up with this:

services.gitlab-runner = {
    settings = {
      log_level = "warning";
      log_format = "info";
      check_interval = 3;
    };

    services.nix-runner = {
      enable = true;
      description = "Nix Runner (NixOS)";

      registrationFlags = [
        "--docker-volumes-from"
        "gitlabnix:ro"

        "--docker-pull-policy"
        "if-not-present"

        "--docker-allowed-pull-policies"
        "if-not-present"
      ];
      authenticationTokenConfigFile = config.age.secrets.gitlab-runner-token-config;

      executor = "docker";

      dockerImage = "local/nix:latest";
      dockerAllowedImages = [ "local/nix:latest" ];

      environmentVariables = {
        NIX_REMOTE = "daemon";
        ENV = "/etc/profile.d/nix-daemon.sh";
        BASH_ENV = "/etc/profile.d/nix-daemon.sh";
      };

      pre_build_script = ''
        # TODO for some reason the /tmp seems to be missing
        mkdir -p /tmp

        # We need to allow modification of nix config for cachix as
        # otherwise it is link to the read only file in the store.
        cp --remove-destination \
          $(readlink -f /etc/nix/nix.conf) /etc/nix/nix.conf
      '';
    };
  };

but I am unsure about the /etc/profile.d/nix-daemon.sh