mirror of
https://gitlab.com/TECHNOFAB/nix-gitlab-ci.git
synced 2026-02-02 19:35:08 +01:00
feat!: add daemon to build & especially cache
This commit is contained in:
parent
bd1cfe94a4
commit
92f3560899
12 changed files with 93 additions and 17 deletions
10
daemon/Dockerfile
Normal file
10
daemon/Dockerfile
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
FROM nixos/nix:latest
|
||||
|
||||
RUN nix-env -iA nixpkgs.mount
|
||||
|
||||
VOLUME "/mnt/nix/store"
|
||||
|
||||
COPY entrypoint.sh /usr/local/bin/
|
||||
COPY nix.conf /etc/nix/nix.conf
|
||||
|
||||
ENTRYPOINT ["/bin/sh", "/usr/local/bin/entrypoint.sh"]
|
||||
10
daemon/entrypoint.sh
Normal file
10
daemon/entrypoint.sh
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
#!/bin/sh
|
||||
|
||||
# this needs elevated permissions, as long as docker mounts a volume and not a hostpath the contents get kept without
|
||||
# needing an overlay mount
|
||||
|
||||
# mount -t overlay overlay -o \
|
||||
# lowerdir=/nix/store,upperdir=/mnt/nix/store/upper,workdir=/mnt/nix/store/workdir \
|
||||
# /nix/store
|
||||
|
||||
nix-daemon
|
||||
2
daemon/nix.conf
Normal file
2
daemon/nix.conf
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
experimental-features = nix-command flakes
|
||||
sandbox = true
|
||||
Loading…
Add table
Add a link
Reference in a new issue