feat!: add daemon to build & especially cache

This commit is contained in:
Technofab 2023-06-09 16:36:29 +02:00
parent bd1cfe94a4
commit 92f3560899
No known key found for this signature in database
GPG key ID: A0AA746B951C8830
12 changed files with 93 additions and 17 deletions

12
ci-image/Dockerfile Normal file
View file

@ -0,0 +1,12 @@
ARG NIX_TAG="latest"
FROM nixos/nix:$NIX_TAG
COPY entrypoint.sh /usr/local/bin/
COPY nix.conf /etc/nix/nix.conf
COPY nix.conf /root/.config/nix/nix.conf
VOLUME "/mnt/nix/daemon-socket"
VOLUME "/mnt/nix/store"
ENTRYPOINT ["/bin/sh", "/usr/local/bin/entrypoint.sh"]

7
ci-image/entrypoint.sh Normal file
View file

@ -0,0 +1,7 @@
#!/bin/sh
set -e
cd "$CI_PROJECT_DIR"
echo "Activating flake's CI shell..."
nix develop .#ci --impure --command "bash"

4
ci-image/nix.conf Normal file
View file

@ -0,0 +1,4 @@
experimental-features = nix-command flakes
accept-flake-config = true
store = unix:///mnt/nix/daemon-socket/socket?real=/mnt/nix/store
sandbox = true