This commit is contained in:
Lilith 2026-01-14 01:41:00 +01:00
parent 1ac7e0c6e1
commit 6200ef7e76
No known key found for this signature in database
GPG key ID: 272C807BD91F8446
5 changed files with 115 additions and 123 deletions

View file

@ -1,20 +1,23 @@
{ sops, config, ...}: {
{ lib, config, ... }:
{
config = lib.mkIf config.server.home-assistant.enable {
sops.secrets."home-assistant/mosquitto/hass" = {};
sops.secrets."home-assistant/mosquitto/hass" = { };
services.mosquitto = {
enable = true;
listeners = [
{
address = "192.168.178.111";
port = 1883;
users.hass = {
acl = [ "readwrite #" ];
hashedPasswordFile = config.sops.secrets."home-assistant/mosquitto/hass".path;
};
}
];
services.mosquitto = {
enable = true;
listeners = [
{
address = "192.168.178.111";
port = 1883;
users.hass = {
acl = [ "readwrite #" ];
hashedPasswordFile = config.sops.secrets."home-assistant/mosquitto/hass".path;
};
}
];
};
networking.firewall.allowedTCPPorts = [ 1883 ];
};
networking.firewall.allowedTCPPorts = [ 1883 ];
}