diff --git a/container/webserver/config/traefik.nix b/container/webserver/config.nix similarity index 83% rename from container/webserver/config/traefik.nix rename to container/webserver/config.nix index caa6bb6..6ed4cdc 100644 --- a/container/webserver/config/traefik.nix +++ b/container/webserver/config.nix @@ -1,6 +1,24 @@ { secret, ... }: { + # mosquitto + + environment.etc."container-webserver/mosquitto/mosquitto.conf" = { + text = '' + listener 1883 + password_file /mosquitto/config/users.conf + ''; + + mode = "0644"; + }; + + environment.etc."container-webserver/mosquitto/users.conf" = { + text = secret.container.webserver.mosquitto.users; + mode = "0644"; + }; + + # traefik + environment.etc."container-webserver/traefik/traefik.toml" = { text = '' [providers] diff --git a/container/webserver/config/mosquitto.nix b/container/webserver/config/mosquitto.nix deleted file mode 100644 index f40fbec..0000000 --- a/container/webserver/config/mosquitto.nix +++ /dev/null @@ -1,17 +0,0 @@ -{ secret, ... }: - -{ - environment.etc."container-webserver/mosquitto/mosquitto.conf" = { - text = '' - listener 1883 - password_file /mosquitto/config/users.conf - ''; - - mode = "0644"; - }; - - environment.etc."container-webserver/mosquitto/users.conf" = { - text = secret.container.webserver.mosquitto.users; - mode = "0644"; - }; -} diff --git a/container/webserver/default.nix b/container/webserver/default.nix index 5f08e37..3b42a03 100644 --- a/container/webserver/default.nix +++ b/container/webserver/default.nix @@ -1,9 +1,6 @@ let secret = import ../../secret/container/webserver.nix; - config-mosquitto = import ./config/mosquitto.nix { inherit secret; }; - config-traefik = import ./config/traefik.nix { inherit secret; }; - - custom-config = config-mosquitto // config-traefik; + custom-config = import ./config.nix { inherit secret; }; in { virtualisation.arion.projects.webserver.settings = {