1
0
Fork 0

webserver: Add mosquitto container

This commit is contained in:
Daniel Kempkens 2022-07-31 01:13:14 +02:00
parent 515610481e
commit e59b059f7c
2 changed files with 17 additions and 5 deletions

View file

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

View file

@ -29,6 +29,7 @@ in
depends_on = [ "ipv6nat" ];
networks = [ "webserver" ];
ports = [ "1883:1883" ];
user = "1883";
volumes = [
"/etc/container-webserver/mosquitto:/mosquitto/config:ro"
];