home/zigbee2mqtt: ensure config is read from sops

This commit is contained in:
makefu 2023-07-17 21:14:15 +02:00
parent 089c3a7865
commit edfcd18ea4
No known key found for this signature in database
GPG key ID: 36F7711F3FC0F225
2 changed files with 10 additions and 2 deletions

View file

@ -9,7 +9,12 @@ in
MusicFolder = "/media/cryptX/music/kinder"; MusicFolder = "/media/cryptX/music/kinder";
Address = "0.0.0.0"; Address = "0.0.0.0";
}; };
systemd.services.navidrome.serviceConfig.RequiresMountFor = [ "/media/cryptX" ]; systemd.services.navidrome.serviceConfig = {
RequiresMountFor = [ "/media/cryptX" ];
Restart = "always";
RestartSec = "15";
};
state = [ "/var/lib/navidrome" ]; state = [ "/var/lib/navidrome" ];
# networking.firewall.allowedTCPPorts = [ 4040 ]; # networking.firewall.allowedTCPPorts = [ 4040 ];

View file

@ -8,6 +8,7 @@ in
{ {
sops.secrets."zigbee2mqtt" = { sops.secrets."zigbee2mqtt" = {
owner = "zigbee2mqtt"; owner = "zigbee2mqtt";
path = "/var/lib/zigbee2mqtt/configuration.yaml"; path = "/var/lib/zigbee2mqtt/configuration.yaml";
}; };
# symlink the zigbee controller # symlink the zigbee controller
@ -23,6 +24,8 @@ in
services.zigbee2mqtt = { services.zigbee2mqtt = {
enable = true; enable = true;
inherit dataDir; inherit dataDir;
# sets DeviceAllow in systemd service
settings.serial.port = "/dev/cc2531";
}; };
services.nginx.recommendedProxySettings = true; services.nginx.recommendedProxySettings = true;
@ -43,7 +46,7 @@ in
systemd.services.zigbee2mqtt = { systemd.services.zigbee2mqtt = {
# override automatic configuration.yaml deployment # override automatic configuration.yaml deployment
environment.ZIGBEE2MQTT_DATA = dataDir; environment.ZIGBEE2MQTT_DATA = dataDir;
#serviceConfig.ExecStartPre = lib.mkForce "${pkgs.coreutils}/bin/true"; serviceConfig.ExecStartPre = lib.mkForce "${pkgs.coreutils}/bin/true";
after = [ after = [
"home-assistant.service" "home-assistant.service"
"mosquitto.service" "mosquitto.service"