-
-
Save eqyiel/bf4dd1c8a0b65a90544cd40a17480db0 to your computer and use it in GitHub Desktop.
darwin nix-daemon distributed builds
This file contains hidden or 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
#!/usr/bin/env bash | |
sudo mkdir -p /run/nix/current-load | |
sudo launchctl unload /Library/LaunchDaemons/org.nixos.nix-daemon.plist | |
sudo rm /Library/LaunchDaemons/org.nixos.nix-daemon.plist | |
sudo curl -fsSL -o /Library/LaunchDaemons/org.nixos.nix-daemon.plist https://gist.github.com/LnL7/ba2eac19e77cd6b4bb02c8de03bf5f4e/raw/69722c2b13c4eb022a1312cd6891838b413e1f96/org.nixos.nix-daemon.plist | |
sudo launchctl load /Library/LaunchDaemons/org.nixos.nix-daemon.plist | |
# Configure /etc/nix/machines | |
# Make sure root can ssh to the builder (known_hosts etc.) | |
# Configure known hosts. |
This file contains hidden or 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
mac1 x86_64-darwin /etc/nix/build_rsa 4 | |
mac2 x86_64-darwin /etc/nix/build_rsa 4 |
This file contains hidden or 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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>EnvironmentVariables</key> | |
<dict> | |
<key>NIX_BUILD_HOOK</key> | |
<string>/nix/var/nix/profiles/default/libexec/nix/build-remote.pl</string> | |
<key>NIX_CURRENT_LOAD</key> | |
<string>/run/nix/current-load</string> | |
<key>NIX_REMOTE_SYSTEMS</key> | |
<string>/etc/nix/machines</string> | |
<key>NIX_SSL_CERT_FILE</key> | |
<string>/nix/var/nix/profiles/default/etc/ssl/certs/ca-bundle.crt</string> | |
</dict> | |
<key>KeepAlive</key> | |
<true/> | |
<key>Label</key> | |
<string>org.nixos.nix-daemon</string> | |
<key>LowPriorityIO</key> | |
<false/> | |
<key>Nice</key> | |
<integer>0</integer> | |
<key>ProcessType</key> | |
<string>Interactive</string> | |
<key>Program</key> | |
<string>/nix/var/nix/profiles/default/bin/nix-daemon</string> | |
<key>SoftResourceLimits</key> | |
<dict> | |
<key>NumberOfFiles</key> | |
<integer>4096</integer> | |
</dict> | |
</dict> | |
</plist> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment