-
Notifications
You must be signed in to change notification settings - Fork 83
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #404 from tweag/add-remote-exec-support
Add support for nix store remote copying
- Loading branch information
Showing
6 changed files
with
108 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
FROM ubuntu:23.04 | ||
|
||
RUN apt-get update -qq && \ | ||
apt-get install openssh-server curl xz-utils sudo locales ca-certificates -y && \ | ||
apt-get clean && \ | ||
rm -rf /var/lib/apt/lists/* | ||
|
||
RUN mkdir -m 0755 /nix && \ | ||
groupadd -r nixbld && \ | ||
chown root /nix && \ | ||
for n in $(seq 1 10); do useradd -c "Nix build user $n" -d /var/empty -g nixbld -G nixbld -M -N -r -s "$(command -v nologin)" "nixbld$n"; done | ||
|
||
RUN curl -L https://nixos.org/nix/install | bash | ||
|
||
COPY .github/nix-server/keys . | ||
|
||
RUN cat ci.pub > $HOME/.ssh/authorized_keys | ||
|
||
RUN echo 'PermitRootLogin yes' >> /etc/ssh/sshd_config && \ | ||
echo ". /root/.nix-profile/etc/profile.d/nix.sh" >> $HOME/.bashrc && \ | ||
ln -sf /root/.nix-profile/bin/nix-store /usr/bin/ && \ | ||
ln -sf /root/.nix-profile/bin/nix-daemon /usr/bin/ | ||
|
||
CMD ["/usr/sbin/sshd", "-D"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
Host nix-server | ||
Hostname localhost | ||
Port 2222 | ||
User root | ||
IdentityFile /home/runner/.ssh/ci | ||
|
||
Host * | ||
StrictHostKeyChecking no | ||
UserKnownHostsFile=/dev/null |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
/**/bazel-* | ||
|
||
/**/node_modules | ||
|
||
.github/nix-server/keys |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters