nixos/netbird: harden and extend options - #287236
Conversation
0cf761f to
4179661
Compare
Signed-off-by: Krzysztof Nazarewski <gpg@kdn.im>
4179661 to
0a1d920
Compare
0a1d920 to
add2bf7
Compare
add2bf7 to
26373ef
Compare
a734f1e to
35a7c67
Compare
|
When enabling And you currently cannot run more than one |
might be caused by merging/lack of netbirdio/netbird#1586 , I'll simply rebase today and try to address your comments tomorrow. |
Works fine for me: |
There was a problem hiding this comment.
I think it would be better style to force the prefix in the relevant locations, otherwise /var/lib/${cfg.name} will always look problematic since it implies any name is possible.
oddlama
left a comment
There was a problem hiding this comment.
I think you'll have to adjust the release notes to apply to 24.11 now that 24.05 is out the door. But the important details look fine to me, so this is good to go from my side. We can iron out any possible details separately if necessary.
|
There are still changes to |
Yeah, the nixos manual command refused to pass, assumed it was expecting me to change it? |
I guess it complains because you cannot edit old release notes |
it refused to pass without changes https://github.com/NixOS/nixpkgs/actions/runs/9399057023/job/25885722356 |
PatrickDaG
left a comment
There was a problem hiding this comment.
Module looks great. Hope it gets merged soon, been long enough.
I would like to test this more myself, but I'm working on a rewrite of the netbird-server modules right now and while I don't think they actually conflict, the merges do.
There was a problem hiding this comment.
Do you plan to add more override files, or why do you first write the file in /etc and later iterate over the one file? I think it would be simpler to skip this and directly access the file from the nix-store in the derivation, skipping one indirection.
There was a problem hiding this comment.
I'm using those on some of my machines and while testing stuff.
There was a problem hiding this comment.
Should the client.ui.enable option then be removed as it doesn't do anything?
There was a problem hiding this comment.
Probs would be better to use formatType.generate "config.json" cfg.config; since you're using the json format type already
There was a problem hiding this comment.
don't think that's necessary, I think the generation uses jq with a separate derivation underneath.
There was a problem hiding this comment.
There is an disable-auto-connect flag but it seems to only apply to netbird up, the link however seems to have run stale as there is no mention of such a feature being planned as far as I can see.
There was a problem hiding this comment.
gotta look into it, I'm using some form of this in my configs successfully
|
I'd merge but NixOS tests seem to be broken or hanging? @Mic92 how to unblock this? |
|
(And this still modifies old release notes) |
any idea how to prevent that? nixpkgs is not activatable without this modification |
Fixing the test? I am not using netbird and have currently other things on my list. Sorry. |
|
I'm not sure if and how the test is even broken. All that's observable is that it's running seemingly forever, and I wondered how to re-trigger it or something. Is any of that ofborg stuff documented anywhere @dasJ? |
I'll adress remaining things this week. Otherwise I didn't touch it apart from rebasing for months already. |
|
I have fixed the tests (I did some incompatible changes to the module on the way), but even though I've added option rename, the manual still doesn't build: |
seems like there is some (actually quite a lot, just not AS relevant as this one) precedent to removing & editing old release notes: |
As per #287236 (comment) , I am temporarily using |
|
Thanks a great deal for sticking through it, and sorry for the long delay. |
Description of changes
I have recently extensively tested and fixed all features of Netbird in my own implementation of multi-instance Netbird installations.
While doing so I discovered another multi-instance implementation got merged into nixpkgs #246055 which is slightly different, but still a solid base to upstream the rest of my changes:
DynamicUserit's own user with minimal set of permissionsopenFirewallby defaultI think it's a pretty good time to upstream, because I will be extensively using it at work: just launched my first Colmena-managed NixOS into GCE.
There are plans to support multi-account connections on the same daemon in Q2/2024 (see the slack message), but it's not known what shape it will take at all.
I decided to implement following significant changes:
tunnelstoclients, because a wordtunneldoes not exist in Netbird's nomenclature (unlike some other VPNs) and is pretty misleading. Alsoclients.*play nicely with my plan to implement aserverin near future.{name, ...}: name->client: client.name) because they make the code very hard to follow and update with increased number of options,Things done
nix.conf? (See Nix manual)sandbox = relaxedsandbox = truenix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/)Add a 👍 reaction to pull requests you find important.