-
-
Notifications
You must be signed in to change notification settings - Fork 13.9k
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
🏡 home-assistant: spring cleaning #157213
Conversation
66eef80
to
65a12e8
Compare
4f9d0dc
to
88ac89e
Compare
7a8cb18
to
0f81576
Compare
6ad4f15
to
8dae13a
Compare
# Final list of extra packages passed into the package, that also includes custom | ||
# component dependencies | ||
extraPackages = cfg.extraPackages | ||
++ map (component: component.dependencies or []) cfg.customComponents; |
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.
We somehow need to propagate python dependencies that custom components have into the final home-assistant package. The silly idea is to define passthru.dependencies
, wondering if there is a more established way of handling these kinds of relationships in nixpkgs.
This is sitill untested, as there is no custom component packaged yet, that would require that.
"met" | ||
"esphome" | ||
] ++ optionals (pkgs.stdenv.hostPlatform.isAarch32 || pkgs.stdenv.hostPlatform.isAarch64) [ | ||
"rpi_power" |
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.
Is that the correct condition to match the target platform?
Happy to help on the custom component stuff |
I read through the PR and looks good to me. For the custom component stuff, I guess I could start a PR for |
I looked through your nur repo recently and I liked the bits about parsing the manifest for dependencies, and using propagatedBuildInputs with a custom builder function. I think that is the way to go, but I wouldn't want to tackle it alone. I also looked into pytest-home assistant-custom-component, which is the reason you wanted home-assistant to be importable. It would be nice to have and we should look into getting that to work, likely using |
fb189fe
to
b592410
Compare
I have walked through these changes with @maralorn and I'm thankful for this feedback. 🙏 I now consider this set of changes ready for the final review period. ⌛ If you have any input on the changes that are in the given scope right now, post them ASAP. |
dae77d5
to
c5a11cf
Compare
Putting so many things into misc is not great, so let's open up a new category called home-automation here and now.
The given example is now closer to a sane default people will want to start with. It also displays the existance of extraComponents, a feature that will receive more usage with home-assistant warning about components that have completely migrated away from YAML configuration.
I doesn't seem to be needed anymore. I built all tests and didn't experience any failures that could've been prevent by it.
If people take the time to setup network-online.target correctly we should wait for it. If they don't it's basically the same as network.target anyway, so no harm done. Over time I've seen multiple integrations that have dealt badly with missing network connectivity at startup, this should alleviate further pains.
c5a11cf
to
adcb4fe
Compare
After this change users with non-declarative configs need to set `services.home-assistant.config` to an `null`, or their `configuration.yaml` will be overwritten. The reason for this is that with rfc42 style defaults the config attribute set will never be empty by default.
It simply should not be required to override the package for such a common use case, especially since the module usually adds another override on top to inherit extraComponents.
Database provisioning was shown to be racy since adding a recorder test using PostgreSQL. There is no harm in waiting for these services, because if they're not available they will be ignored.
Passing psycopg2 for PostgreSQL support in the recorder component is one of the more popular use cases to pass an extra package.
The rpi_power integration is part of the onboarding flow on Raspberry Pi SBCs.
Co-Authored-By: Martin Weinelt <hexa@darmstadt.ccc.de>
Useful data provided for the NixOS test.
There are now multiple combinations of how one can pass either extraPackages or extraComponents. We now test those passed directly to the package via an override, and those passed indirectly via the module, that ultimately results in a second override to the package.
adcb4fe
to
32bd0aa
Compare
Motivation for this change
Some overdue maintenance tasks and some features all users have been waiting for. 🏡
network-online.target
pkgs.formats
extraComponents
andextraPackages
from the moduleautoExtraComponents
unconditionally and remove the optionapplyDefaultConfig
optionPostponed
/var/lib/hass/www
(served as/local
)Open questions:
Renameconfig
tosettings
? AndlovelaceConfig
tolovelaceSettings
?How to create optionalmkOption
fields? Not well supported, have to allnull
values and filter them out recursively.Things done
sandbox = true
set innix.conf
? (See Nix manual)nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)nixos/doc/manual/md-to-db.sh
to update generated release notes