guysoft / CustomPiOS

A Raspberry Pi and other ARM devices distribution builder
GNU General Public License v3.0
516 stars 150 forks source link

feat: add headless_nm module #230

Open KwadFan opened 1 month ago

KwadFan commented 1 month ago
guysoft commented 1 month ago

Thanks so much for doing that! It really helps me get it in. I was looking at a mountain of work and this reduces it drastically.

What is blocking me from merging:

  1. (not really a blocker, just more work on my end). I am not sure how to handle both headless_nm and network together. I think we can have all three options in the network module (wpa-supplicant, nm raw like I did, someone said it helped them, and headless_nm as the default). I can make the network module automatically import it in CustomPiOS v2 when you select it in the network module.

  2. (might need rework on your end) powersave is both in network and headless_nm.

This is the one in the network module: https://github.com/guysoft/CustomPiOS/blob/devel/src/modules/network/filesystem/usr/local/bin/pwrsave

This is the one in this PR: https://github.com/KwadFan/CustomPiOS/blob/upstream/headless_nm/src/modules/headless_nm/filesystem/usr/local/bin/pwrsave

I guess it makes more sense to have that in the network module.

KwadFan commented 1 month ago

Moving from #219

Todo:

KwadFan commented 1 month ago
  1. (not really a blocker, just more work on my end). I am not sure how to handle both headless_nm and network together. I think we can have all three options in the network module (wpa-supplicant, nm raw like I did, someone said it helped them, and headless_nm as the default). I can make the network module automatically import it in CustomPiOS v2 when you select it in the network module.

Imho, having to much options is confusing endusers, if you want to keep all options it has to be decided beforehand by the developer of an image, so it needs to be extendend to set the option that has to be used.

  1. (might need rework on your end) powersave is both in network and headless_nm.

This is the one in the network module: https://github.com/guysoft/CustomPiOS/blob/devel/src/modules/network/filesystem/usr/local/bin/pwrsave

This is the one in this PR: https://github.com/KwadFan/CustomPiOS/blob/upstream/headless_nm/src/modules/headless_nm/filesystem/usr/local/bin/pwrsave

I guess it makes more sense to have that in the network module.

In this case, I think you misinterpreted how it should work. its either not both! So either you use headless_nm or network module. They are not dependent of each other.

KwadFan commented 1 month ago

@guysoft @foosel The only third option that comes to my mind would be fusing them together, which probably will break things that exist. So, in pov as a dev not a good choice, but maybe not avoidable in the longrun. As I mentioned earlier on discord, in the longrun we need to talk about netplan.io or something like that. Infrastructure as Code isnt only a buzzword its the future even in pi image if you ask me, therefor that what exists is more or less a hacky custom made solution. Even it works fine, its not based on common tools...

Regards Kwad

guysoft commented 1 month ago

I am working on it. You should have a PR to your PR soon

guysoft commented 1 month ago

@KwadFan Ok, I have a PR that removes powersave. https://github.com/KwadFan/CustomPiOS/pull/1

I also have code that turns headless_nm in to part of network module (via sub-submodule, network references it). If you incorporate my PR I can merge this.

guysoft commented 4 weeks ago

@KwadFan ok I have it working here: https://github.com/KwadFan/CustomPiOS/pull/1

Does this work for you?