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
WIP nixos/nix-daemon: Organize buildMachine options with a submodule #47636
WIP nixos/nix-daemon: Organize buildMachine options with a submodule #47636
Conversation
Too late for 18.09, but I like the idea. |
@grahamc my other idea was to check if |
default = "-"; | ||
description = '' | ||
The path to the SSH private key with which to authenticate with | ||
the build machine. <literal>"-"</literal> indicates falling back |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably should either drop the "
or at least move the quote out of the literal element.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think I mean the quote to be there to show the Nix literal one would write, rather than string literal, leaving it to the literal to figure out that -
only makes sense as a string.
default = 1; | ||
description = '' | ||
Something at indicates how fast the machine is relative to an | ||
arbitrary norm??? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
An arbitrary integer to indicate the build performance of this system relative to the other buildMachines.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
... higher|lower is faster.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
might be best to use unsigned/ints.between 0 100/positive as type.
decriptions = '' | ||
A list of features derivations built with this remote may choose | ||
to use or not. (See the documentation on Nix itself for what | ||
those features are.) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What do you mean by the above parentheticals?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was hoping somewhere else might actually list valid features, but https://nixos.org/nix/manual/#chap-distributed-builds again just says they exist, other than the "kvm" example.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, there is no list of valid features. You can make them up. I have a machine with the feature "big-mistake-this-ones-impure".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh haha
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
a grep on nixpkgs gives "big-parallel"/"kvm"/"benchmark"/"nixos-test". Even if it stays freefrom, it would be nice to list the default ones with a types.either( enum [ "kvm" ... ] or string).
hostName = mkOption { | ||
type = types.string; | ||
description = '' | ||
The hostname of the build machine. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe note this hostname has to resolve.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what good can be hostname that doesn't resolve ?
type = types.listOf types.string; | ||
default = []; | ||
description = '' | ||
The system types the build machine can execute derivations on. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about some examples on the above two?
Thanks @grahamc, I'll fix these later tonight. |
Are there any updates on this pull request, please? |
may be ok for 19.09. I can test once the patch is fixed. |
For the author, reviewers, and committers: this PR was scanned and appears to add a use of the deprecated
|
}; | ||
sshKey = mkOption { | ||
type = types.string; | ||
default = "-"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because of #69900, it would be a good idea to force this option to not have a value from the store. This can be done with an apply = toString
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This isn't enough to guarantee this at all actually. See #78640 for a better way in the future. For now this should be just types.str
''; | ||
}; | ||
system = mkOption { | ||
type = types.string; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should use "nullOr"
#83104 is an updated version of this, closing |
Motivation for this change
What's the best way to test this sort of thing?
did not work for example.
Also, is this reasonable for 18.09 or is that fact that garbage attributes will be rejected a problem?
Things done
sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)nix path-info -S
before and after)