-
-
Notifications
You must be signed in to change notification settings - Fork 505
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
modules/nebula: add nebula overlay network #1285
base: master
Are you sure you want to change the base?
Conversation
7c2c315
to
4809ed4
Compare
tun.device = mkOption { | ||
type = types.nullOr types.str; | ||
default = null; | ||
description = "Name of the tun device. Defaults to nebula.\${networkName}."; | ||
}; |
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.
tun.device = mkOption { | |
type = types.nullOr types.str; | |
default = null; | |
description = "Name of the tun device. Defaults to nebula.\${networkName}."; | |
}; | |
tun.device = mkOption { | |
type = types.str; | |
default = "nebula.\${networkName}"; | |
description = "Name of the TUN device."; | |
}; |
You'll probably also need to set defaultText
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'm not sure this is a good idea.
It appears that on Darwin the tunneling interface currently must be utun[0-9]+
.
The parameter is not required, so I don't see an advantage to setting a default.
modules/services/nebula.nix
Outdated
script = '' | ||
exec ${cfg.package}/bin/nebula -config ${configFile} | ||
''; |
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.
script = '' | |
exec ${cfg.package}/bin/nebula -config ${configFile} | |
''; | |
command = "${cfg.package}/bin/nebula -config ${configFile}"; |
type = types.attrsOf ( | ||
types.submodule { | ||
options = { | ||
enable = mkOption { |
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.
enable = mkOption { | |
enable = mkEnableOption { |
Can you replace all the booleans that default to false
and just enable logic with mkEnableOption
?
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.
Implementing this change yields errors like:
error: cannot coerce a set to a string: { type = «thunk»; description = "Whether this node is a lighthouse."; }
I've reverted this for now, as it seems to be a stylistic rather than operational point - and I am using this in prod.
If there are in fact compelling reasons for this change, which I'm not tracking with, please help point me in the right direction 🙏
Apologies for the delay, I was on leave. Thanks for the review and suggestions, added @Enzime as co-author |
91c39d5
to
e62583f
Compare
Signed-off-by: Sirio Balmelli <[email protected]> Co-authored-by: Michael Hoang <[email protected]>
e62583f
to
2a8de1d
Compare
Added on a similar pattern as netbird; this is in production on our systems locally.