diff --git a/nixos/modules/services/misc/pykms.nix b/nixos/modules/services/misc/pykms.nix index c9613f684e842..a8f08e5ab1862 100644 --- a/nixos/modules/services/misc/pykms.nix +++ b/nixos/modules/services/misc/pykms.nix @@ -24,9 +24,12 @@ in description = "Whether to enable the PyKMS service."; }; + package = lib.mkPackageOption pkgs "pykms" { }; + listenAddress = lib.mkOption { type = lib.types.str; default = "0.0.0.0"; + example = "::"; description = "The IP address on which to listen."; }; @@ -78,13 +81,13 @@ in wantedBy = [ "multi-user.target" ]; # python programs with DynamicUser = true require HOME to be set environment.HOME = libDir; - serviceConfig = with pkgs; { + serviceConfig = { DynamicUser = true; StateDirectory = baseNameOf libDir; - ExecStartPre = "${lib.getBin pykms}/libexec/create_pykms_db.sh ${libDir}/clients.db"; + ExecStartPre = "${lib.getBin cfg.package}/libexec/create_pykms_db.sh ${libDir}/clients.db"; ExecStart = lib.concatStringsSep " " ( [ - "${lib.getBin pykms}/bin/server" + "${lib.getBin cfg.package}/bin/server" "--logfile=STDOUT" "--loglevel=${cfg.logLevel}" "--sqlite=${libDir}/clients.db" diff --git a/pkgs/by-name/py/pykms/package.nix b/pkgs/by-name/py/pykms/package.nix index ba8710caeba36..a00cdbe4b45c7 100644 --- a/pkgs/by-name/py/pykms/package.nix +++ b/pkgs/by-name/py/pykms/package.nix @@ -36,13 +36,13 @@ let in pypkgs.buildPythonApplication rec { pname = "pykms"; - version = "unstable-2021-01-25"; + version = "0-unstable-2024-07-06"; src = fetchFromGitHub { owner = "Py-KMS-Organization"; repo = "py-kms"; - rev = "1435c86fe4f11aa7fd42d77fa61715ca3015eeab"; - hash = "sha256-9KiMbS0uKTbWSZVIv5ziIeR9c8+EKfKd20yPmjCX7GQ="; + rev = "465f4d14c728819d4eb00e3419bd1cb98af7f81c"; + hash = "sha256-/XbMbcBcZPO7joHyaprJ29Cq4gNpuuzTzj2x1XDIyj8="; }; sourceRoot = "${src.name}/py-kms";