Commit graph

71 commits

Author SHA1 Message Date
Wolfgang Walther aefcb0d50d
treewide: run nixfmt 1.0.0 2025-07-24 14:58:18 +02:00
Stefan Wiehler 44dd157b6f nixos/home-assistant: add custom components to used components query
There should be no need to add custom components without YAML configuration to
extraComponents for systemd service modifications to become effective (e.g.
serial access).
2025-04-24 19:26:46 +02:00
Stefan Wiehler 27eab49a9e home-assistant-custom-components.benqprojector: init at 0.1.3 2025-04-24 19:26:46 +02:00
Silvan Mosberger 374e6bcc40 treewide: Format all Nix files
Format all Nix files using the officially approved formatter,
making the CI check introduced in the previous commit succeed:

  nix-build ci -A fmt.check

This is the next step of the of the [implementation](https://github.com/NixOS/nixfmt/issues/153)
of the accepted [RFC 166](https://github.com/NixOS/rfcs/pull/166).

This commit will lead to merge conflicts for a number of PRs,
up to an estimated ~1100 (~33%) among the PRs with activity in the past 2
months, but that should be lower than what it would be without the previous
[partial treewide format](https://github.com/NixOS/nixpkgs/pull/322537).

Merge conflicts caused by this commit can now automatically be resolved while rebasing using the
[auto-rebase script](8616af08d9/maintainers/scripts/auto-rebase).

If you run into any problems regarding any of this, please reach out to the
[formatting team](https://nixos.org/community/teams/formatting/) by
pinging @NixOS/nix-formatting.
2025-04-01 20:10:43 +02:00
Sandro a7cb5b1ba5
nixos/home-assistant: use full path for option in description 2025-02-07 17:10:35 +01:00
Robert Schütz da7138684b nixos/home-assistant: declarative blueprints 2025-02-03 10:54:30 -08:00
Martin Weinelt 9687eb77fe
nixos/home-assistant: update unit_system options
Closes: #373674
2025-01-15 12:24:15 +01:00
Bjørn Forsman bbcb27714f nixos/home-assistant: allow amshan to access serial ports
Separate it from the first part of the list, because that part is
updated mechanically.
2025-01-13 16:05:57 +01:00
nicoo f6c5531461
nixos: Don't set !allowSubstitutes (#314664)
It is set by `runCommandLocal` and prevents fetching the build output
from `cache.nixos.org` or another trusted substituter.
2024-12-12 18:26:24 +00:00
Martin Weinelt ee59cca0f1
nixos/home-assistant: add reference to signal handling section 2024-12-09 19:00:29 +01:00
Martin Weinelt 28b8aa8c4c
nixos/home-assistant: support extraArgs 2024-12-09 19:00:28 +01:00
Martin Weinelt 179fd97dae
nixos/home-assistant: update component hardening lists 2024-12-09 19:00:28 +01:00
Martin Weinelt 00b9d1f754
nixos/home-assistant: replace global with lib 2024-12-09 19:00:27 +01:00
Martin Weinelt 0924dfae80
nixos/home-assistant: escape yaml functions in lovelace config
and improve the documentation around this topic by a large margin.

Closes: #352651
2024-11-01 00:47:46 +01:00
Robert Schütz 75ad0af1b6 nixos/home-assistant: set WorkingDirectory 2024-08-26 09:39:06 -07:00
Robert Schütz a5f8d3fe02 nixos/home-assistant: customComponents must use buildHomeAssistantComponent 2024-07-26 07:33:40 -07:00
Kacper Koniuszy 7b81a213cf nixos/home-assistant: fix symlinking multi-manifest custom components
frenck/spook includes a second manifest for an integration. The current
copyCustomComponents script assumed that only one component directory
will be found, which in this case resulted in a malformed symlink
destination:

lrwxrwxrwx 1 hass hass 224 Jun 23 17:23 spook -> '/nix/store/r41ics22zs578avzqf7x86plcgn2q71h-python3.12-frenck-spook-v3.0.1/custom_components/spook/integrations/spook_inverse'$'\n''/nix/store/r41ics22zs578avzqf7x86plcgn2q71h-python3.12-frenck-spook-v3.0.1/custom_components/spook'
2024-06-23 22:03:37 +02:00
stuebinm 6afb255d97 nixos: remove all uses of lib.mdDoc
these changes were generated with nixq 0.0.2, by running

  nixq ">> lib.mdDoc[remove] Argument[keep]" --batchmode nixos/**.nix
  nixq ">> mdDoc[remove] Argument[keep]" --batchmode nixos/**.nix
  nixq ">> Inherit >> mdDoc[remove]" --batchmode nixos/**.nix

two mentions of the mdDoc function remain in nixos/, both of which
are inside of comments.

Since lib.mdDoc is already defined as just id, this commit is a no-op as
far as Nix (and the built manual) is concerned.
2024-04-13 10:07:35 -07:00
Martin Weinelt 055a8f709a
nixos/home-assistant: always add dependencies for default integrations
These are loaded unconditionally during bootstrap, and home-assistant
will now fail to start, if these aren't provided.
2024-02-11 04:09:52 +01:00
Martin Weinelt 3d67816966
home-assistant: 2024.1.6 -> 2024.2.1
https://www.home-assistant.io/blog/2024/02/07/release-20242/
https://github.com/home-assistant/core/releases/tag/2024.2.1
2024-02-10 04:15:41 +01:00
Jade Lovelace fe474ed61a nixos: fix remaining services for network-online dep fix 2024-01-19 00:11:34 -08:00
Sandro Jäckel d4c622ec5f
nixos/home-assistant: fix removing of uninstalled custom components
Before components was not an array and the first loop did never loop
through all entries but through the entire output of find without
splitting by new line.

Tested by copying the preStart script out of the nix store, doing the
change and observing that now the custom-components directory is indeed
being cleaned up after removing a custom component.
2023-12-20 05:00:05 +01:00
Martin Weinelt ebfca42b8b
Merge pull request #272576 from NixOS/home-assistant
home-assistant: 2023.11.3 -> 2023.12.0
2023-12-10 14:51:43 +01:00
Zhong Jianxin b097e95193 nixos/home-automation: really fix lovelace card entrypoint 2023-12-10 19:12:55 +08:00
Martin Weinelt 04c2893d58
nixos/home-assistant: fix broken reference in option example 2023-12-09 17:51:13 +01:00
Martin Weinelt 0645ff3b62
nixos/home-assistant: update bluetooth components
eq3btsmart was removed in 2023.12.0.
2023-12-09 17:51:12 +01:00
Martin Weinelt d809a6f9c3
nixos/home-automation: fix lovelace card entrypoint
Only append the .js extension to the card pname, not to the specified
entrypoint.
2023-12-06 04:35:35 +01:00
Martin Weinelt b908dc8654
Merge pull request #271785 from SuperSandro2000/hass-custom-lovelace
nixos/home-assistant: fix custom lovelace module loading
2023-12-06 04:10:34 +01:00
Sandro Jäckel 663dbfb82d
nixos/home-assistant: fix custom lovelace module loading
based on https://community.home-assistant.io/t/ui-lovelace-yaml-and-custom-resources/240178/4

Tested on a home-assistant server and before the card was not loaded at all.
After this it threw an error that my config is wrong.
2023-12-03 00:53:59 +01:00
Sandro Jäckel 57bfbc781c
nixos/home-assistant: fix error when switching between writable and none writable lovelace config
error message before was:
cp: not writing through dangling symlink '/var/lib/hass/ui-lovelace.yaml'
2023-12-02 23:04:48 +01:00
Martin Weinelt f30192ae6f
nixos/home-assistant: add customComponents support
Allows passing custom component packages, that get installed into
home-assistant's state directory.
Python depedencies, that are propagated from the custom component
get passed into `extraPackages`, so they are available to
home-assistant at runtime.

This is implemented in a way, that allows coexistence with custom
components not managed through the NixOS module.
2023-11-10 22:00:36 +01:00
Martin Weinelt 9a941c58e5
nixos/home-assistant: add customLovelaceModules support
Allows the installation of custom lovelace modules, that can inject
css/js into the frontend and offer a wide variety of widgets.
2023-11-10 22:00:30 +01:00
Martin Weinelt 0b2ab262bc
home-assistant: 2023.10.5 -> 2023.11.0
https://www.home-assistant.io/blog/2023/11/01/release-202311/
2023-11-01 22:28:12 +01:00
Lin Jian 2a27bf588f
Merge pull request #261733 from nbdd0121/hass
nixos/home-assistant: use runCommandLocal for configuration.yaml
2023-10-26 02:23:21 +08:00
Martin Weinelt d042a29613
Merge pull request #253764 from linj-fork/fix-ping-wrapper
nixos/network-interfaces: stop wrapping ping with cap_net_raw
2023-10-20 00:57:55 +02:00
Gary Guo d7d1894a36 nixos/home-assistant: use runCommandLocal for configuration.yaml
It's a quite trivial operation, no need to query substitutors.
2023-10-17 23:27:46 +01:00
Martin Weinelt 9a20605910
nixos/home-assistant: update bluetooth integrations 2023-10-05 05:09:55 +02:00
Lin Jian 759ec1113d
nixos/network-interfaces: stop wrapping ping with cap_net_raw
From systemd 243 release note[1]:

This release enables unprivileged programs (i.e. requiring neither
setuid nor file capabilities) to send ICMP Echo (i.e. ping) requests
by turning on the "net.ipv4.ping_group_range" sysctl of the Linux
kernel for the whole UNIX group range, i.e. all processes.

So this wrapper is not needed any more.

See also [2] and [3].

This patch also removes:
- apparmor profiles in NixOS for ping itself and the wrapped one
- other references for the wrapped ping

[1]: 8e2d9d40b3/NEWS (L6457-L6464)
[2]: https://github.com/systemd/systemd/pull/13141
[3]: https://fedoraproject.org/wiki/Changes/EnableSysctlPingGroupRange
2023-09-21 16:52:16 +08:00
Martin Weinelt 822c33c217
nixos/home-assistant: allow bluetooth for gardena_bluetooth component 2023-08-02 22:42:50 +02:00
Martin Weinelt 6d934088ea
nixos/home-assistant: update bluetooth components 2023-05-04 07:33:32 +02:00
Robert Schütz 2b81862da7
Merge pull request #224908 from SuperSandro2000/home-assistant-drv
nixos/home-assistant: fix infinite recursion when derivations are used in config
2023-04-06 07:56:47 -07:00
Martin Weinelt e89108897d
nixos/home-assistant: Allow serial access for otbr 2023-04-06 13:43:55 +02:00
Sandro Jäckel 94b402045d
nixos/home-assistant: fix infinite recursion when derivations are used in config 2023-04-06 01:26:24 +02:00
Felix Buehler d10e69c86b treewide: deprecate isNull
https://nixos.org/manual/nix/stable/language/builtins.html#builtins-isNull
2023-03-06 22:40:04 +01:00
Martin Weinelt e01ccd6245
home-assistant: Inject extra dependencies through PYTHONPATH
Injecting configuration specific dependencies into the
propagatedBuildInputs of the home-assistant package forces alot of
rebuilds while setting up home-assistant, which is annoying.

By passing optional dependencies into home-assistant via the systemd
units PYTHONPATH environment variable, only he concatenation of
library paths in the systemd unit requires a rebuild.

This also means users can rely heavily on the cached home-assistant
package and will rarely have to build from source, if ever.
2023-02-20 18:37:20 +01:00
Martin Weinelt df8007c30f
nixos/home-assistant: Update bluetooth components 2023-02-02 04:38:22 +01:00
Martin Weinelt 87c22c7909
nixos/home-assistant: update bluetooth components 2022-12-08 02:36:55 +01:00
Martin Weinelt 7bbc6e29b1 nixos/home-assistant: update bluetooth components 2022-11-05 13:30:17 +01:00
Martin Weinelt 4978672881
nixos/home-assistant: update bluetooth and serial component list
And fix the capability logic for bluetooth devices.
2022-09-30 15:07:17 +02:00
pennae ef176dcf7e nixos/*: automatically convert option descriptions
conversions were done using https://github.com/pennae/nix-doc-munge
using (probably) rev f34e145 running

    nix-doc-munge nixos/**/*.nix
    nix-doc-munge --import nixos/**/*.nix

the tool ensures that only changes that could affect the generated
manual *but don't* are committed, other changes require manual review
and are discarded.
2022-08-31 16:32:53 +02:00