1
0
Fork 0

webserver: Add mosquitto container

This commit is contained in:
Daniel Kempkens 2022-07-31 00:52:43 +02:00
parent d3ee1dfbe4
commit 515610481e
2 changed files with 16 additions and 2 deletions

View file

@ -2,10 +2,10 @@ let
secret = import ../../../secret/container/webserver.nix; secret = import ../../../secret/container/webserver.nix;
in in
{ {
environment.usr."local/etc/container-webserver/mosquitto/mosquitto.conf".text = '' environment.etc."container-webserver/mosquitto/mosquitto.conf".text = ''
listener 1883 listener 1883
password_file /mosquitto/config/users.conf password_file /mosquitto/config/users.conf
''; '';
environment.usr."local/etc/container-webserver/mosquitto/users.conf".text = secret.container.webserver.mosquitto.users; environment.etc."container-webserver/mosquitto/users.conf".text = secret.container.webserver.mosquitto.users;
} }

View file

@ -21,6 +21,20 @@ in
}; };
}; };
mosquitto = {
service = {
image = "eclipse-mosquitto:2";
container_name = "mosquitto";
restart = "always";
depends_on = [ "ipv6nat" ];
networks = [ "webserver" ];
ports = [ "1883:1883" ];
volumes = [
"/etc/container-webserver/mosquitto:/mosquitto/config:ro"
];
};
};
ifconfig-sexy = { ifconfig-sexy = {
service = { service = {
image = "ghcr.io/nifoc/ifconfig.sexy-caddy:master"; image = "ghcr.io/nifoc/ifconfig.sexy-caddy:master";