Home Assistant: Difference between revisions
imported>NewAM Added a snippet for using a private x509 certificate authority. |
imported>NewAM Update the instructions to trust a private certificate authority. |
||
| Line 371: | Line 371: | ||
Home Assistant does not natively support adding a private CA to the certificate store (see [https://community.home-assistant.io/t/add-private-cas-to-certificate-store/267452 this thread] for more details). | Home Assistant does not natively support adding a private CA to the certificate store (see [https://community.home-assistant.io/t/add-private-cas-to-certificate-store/267452 this thread] for more details). | ||
Home Assistant trusts certificates provided by the certifi python package. Using | Home Assistant trusts certificates provided by the certifi python package, which nix overwrites with the cacert package. Using a overrides you can append your root CA certificate to the certificates provided by certifi. | ||
<syntaxHighlight lang=nix> | <syntaxHighlight lang=nix> | ||
| Line 377: | Line 377: | ||
extraPackages = py: with py; [ ]; | extraPackages = py: with py; [ ]; | ||
packageOverrides = final: prev: { | packageOverrides = final: prev: { | ||
certifi = prev.certifi. | certifi = prev.certifi.override { | ||
cacert = pkgs.cacert.override { | |||
extraCertificateFiles = [ ./my_custom_root_ca.crt ]; | |||
}; | |||
}; | |||
} | |||
}).overrideAttrs (oldAttrs: { | }).overrideAttrs (oldAttrs: { | ||
doInstallCheck = false; | doInstallCheck = false; | ||