Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pass hostnames to --option builders and have it pick up the rest from /etc/nix/machines #2766

Open
teto opened this issue Apr 14, 2019 · 2 comments
Labels

Comments

@teto
Copy link
Member

teto commented Apr 14, 2019

I would like to set remote builds manually, i.e., on a per build basis because my decision process to buiid remotely is too complex to be described in nix.
I usually prefer to build locally except when I am on the move (on battery) or if I am already building stuff. It also depends on what I build etc. Also the state of my builders is erratic, one is often down or the other busy etc.
Basically I have configured 2 remote builders that appear in /etc/nix/machines.
Now I would like to refer to them by a name or their hostname and have nix pick the configuration from /etc/nix/machines instead of having to specify every parameter on the command line as explained in https://nixos.org/nix/manual/#chap-distributed-builds.
Like
nix-build -A myPkg ~/nixpkgs --option builders 'toto'
with /etc/nix/machines as nix attributes ?

  nixosMachine = {
    hostName = "nixos.totoBuilder.net";
    sshUser = "tata";
    sshKey = "/home/teto/.ssh/myKey";
    system = "x86_64-linux";
    maxJobs = 2;
    speedFactor = 2;
    supportedFeatures = [ "big-parallel" "kvm" ];
    };

or just pass the nix attribute in the builder ?

@stale
Copy link

stale bot commented Feb 20, 2021

I marked this as stale due to inactivity. → More info

@stale stale bot added the stale label Feb 20, 2021
@teto
Copy link
Member Author

teto commented Apr 3, 2022

still relevant to me

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant