1 { lib, pkgs, config, ... }:
7 cfg = config.services.domoticz;
8 pkgDesc = "Domoticz home automation";
15 enable = mkEnableOption (lib.mdDoc pkgDesc);
20 description = lib.mdDoc "IP address to bind to.";
26 description = lib.mdDoc "Port to bind to for HTTP, set to 0 to disable HTTP.";
33 config = mkIf cfg.enable {
35 systemd.services."domoticz" = {
36 description = pkgDesc;
37 wantedBy = [ "multi-user.target" ];
38 after = [ "network-online.target" ];
41 StateDirectory = "domoticz";
44 ${pkgs.domoticz}/bin/domoticz -noupdates -www ${toString cfg.port} -wwwbind ${cfg.bind} -sslwww 0 -userdata /var/lib/domoticz -approot ${pkgs.domoticz}/share/domoticz/ -pidfile /var/run/domoticz.pid