Commit Graph

54 Commits

Author SHA1 Message Date
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
pennae
6039648c50 nixos/*: automatically convert option docs 2022-08-19 22:40:58 +02:00
pennae
8f8e101527 nixos/*: normalize <package> to <literal>
this renders the same in the manpage and a little more clearly in the
html manual. in the manpage there continues to be no distinction from
regular text, the html manual gets code-type markup (which was probably
the intention for most of these uses anyway).
2022-08-19 22:40:58 +02:00
Martin Weinelt
b2367dbdd1
nixos/home-assistant: update hardening for bluetooth components
A larger number of bluetooth components were introduced in 2022.8.0. To
make them work we need to add a hardening exception, so they can
discover and use bluetooth devices.
2022-08-04 12:23:21 +02:00
pennae
6b13dd0e9e
Merge pull request #183491 from pennae/automatic-md-conversions
treewide: automatically md-convert option descriptions
2022-08-02 02:15:30 +02:00
Alyssa Ross
5330c0a1af
treewide: use isAarch where appropriate 2022-07-30 16:18:27 +00:00
pennae
2e751c0772 treewide: automatically md-convert option descriptions
the conversion procedure is simple:

 - find all things that look like options, ie calls to either `mkOption`
   or `lib.mkOption` that take an attrset. remember the attrset as the
   option
 - for all options, find a `description` attribute who's value is not a
   call to `mdDoc` or `lib.mdDoc`
 - textually convert the entire value of the attribute to MD with a few
   simple regexes (the set from mdize-module.sh)
 - if the change produced a change in the manual output, discard
 - if the change kept the manual unchanged, add some text to the
   description to make sure we've actually found an option. if the
   manual changes this time, keep the converted description

this procedure converts 80% of nixos options to markdown. around 2000
options remain to be inspected, but most of those fail the "does not
change the manual output check": currently the MD conversion process
does not faithfully convert docbook tags like <code> and <package>, so
any option using such tags will not be converted at all.
2022-07-30 15:16:34 +02:00
Kat Inskip
8f2c49ece6
nixos/home-assistant: make the reload triggers dependent upon cfg.config 2022-07-11 08:19:25 -07:00
Andreas Rammhold
cfbcf381c2
nixos/home-assistant: reload the daemon when configuration changed
Reload the service when configuration changes. This means that we don't
have a potentially slow startup for every small configuration change.
2022-06-22 16:20:11 +02:00
Robert Schütz
ccf42c7987 nixos/home-assistant: fix openFirewall 2022-05-05 15:04:46 -07:00
Martin Weinelt
0dd8ef5ef7
nixos/home-assistant: update package option description
Overriding can now happen using module options, which is preferred
because it is more discoverable and doesn't require knowledge of
overrides in the first place.
2022-02-22 12:07:02 +01:00
Martin Weinelt
1090fcb7c9
nixos/home-assistant: allow null config value
While the documentation said to set this to null, in case an imperative
config was supposed to be used, this was not possible with the typing in
place.
2022-02-22 12:04:04 +01:00
Martin Weinelt
047429df52
nixos/home-assistant: fix package override
The attributes can be missing on the package, since they're optional, so
catch that by adding empty defaults.
2022-02-17 00:50:44 +01:00
piegames
c1d2042219
home-assistant: clean up preStart
Co-Authored-By: Martin Weinelt <hexa@darmstadt.ccc.de>
2022-02-15 23:41:51 +01:00
Martin Weinelt
2f644fd3e6
nixos/home-assistant: add rpi_power component by default on arm
The rpi_power integration is part of the onboarding flow on Raspberry Pi
SBCs.
2022-02-15 23:41:51 +01:00
Martin Weinelt
918100f48f
nixos/home-assistant: Wait for {mysql,postgresql}.service
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.
2022-02-15 23:41:50 +01:00
Martin Weinelt
13faa004b6
nixos/home-assistant: add extraPackages option 2022-02-15 23:41:49 +01:00
Martin Weinelt
4a0b964b34
nixos/home-assistant: add extraComponents option
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.
2022-02-15 23:41:48 +01:00