1
0
Fork 0

webserver: Move config into a single file

This commit is contained in:
Daniel Kempkens 2022-07-31 12:41:00 +02:00
parent f07c99b908
commit f509abebec
3 changed files with 19 additions and 21 deletions

View file

@ -1,6 +1,24 @@
{ secret, ... }: { 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" = { environment.etc."container-webserver/traefik/traefik.toml" = {
text = '' text = ''
[providers] [providers]

View file

@ -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";
};
}

View file

@ -1,9 +1,6 @@
let let
secret = import ../../secret/container/webserver.nix; secret = import ../../secret/container/webserver.nix;
config-mosquitto = import ./config/mosquitto.nix { inherit secret; }; custom-config = import ./config.nix { inherit secret; };
config-traefik = import ./config/traefik.nix { inherit secret; };
custom-config = config-mosquitto // config-traefik;
in in
{ {
virtualisation.arion.projects.webserver.settings = { virtualisation.arion.projects.webserver.settings = {