diff --git a/nixos/modules/services/misc/domoticz.nix b/nixos/modules/services/misc/domoticz.nix index 52443f49f7b3..13e56f2faea5 100644 --- a/nixos/modules/services/misc/domoticz.nix +++ b/nixos/modules/services/misc/domoticz.nix @@ -1,7 +1,4 @@ { lib, pkgs, config, ... }: - -with lib; - let cfg = config.services.domoticz; @@ -12,16 +9,16 @@ in { options = { services.domoticz = { - enable = mkEnableOption pkgDesc; + enable = lib.mkEnableOption pkgDesc; - bind = mkOption { - type = types.str; + bind = lib.mkOption { + type = lib.types.str; default = "0.0.0.0"; description = "IP address to bind to."; }; - port = mkOption { - type = types.port; + port = lib.mkOption { + type = lib.types.port; default = 8080; description = "Port to bind to for HTTP, set to 0 to disable HTTP."; }; @@ -30,7 +27,7 @@ in { }; - config = mkIf cfg.enable { + config = lib.mkIf cfg.enable { systemd.services."domoticz" = { description = pkgDesc;