From 4e83bf9761382490fe81e8ff7fc7c41dc1be54dc Mon Sep 17 00:00:00 2001 From: Tamipes Date: Sat, 22 Aug 2026 20:25:22 +0200 Subject: [PATCH] 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"