From 66c5e4280a36a0e5f21c715069cce2f467fc82b3 Mon Sep 17 00:00:00 2001 From: kiskaadee Date: Thu, 15 Oct 2026 03:36:40 -0500 Subject: [PATCH] feat(nixos): add pydantic to host runtime environment and constrain dependency range - Add pydantic to environment.systemPackages in nixos/configuration.nix - Add pydantic to homelab-gitops.service path in nixos/modules/homeserver.nix - Constrain pydantic dependency to >=2.0,<3.0 in pyproject.toml --- nixos/configuration.nix | 3 ++- nixos/modules/homeserver.nix | 10 +++++++++- pyproject.toml | 2 +- uv.lock | 2 +- 4 files changed, 13 insertions(+), 4 deletions(-) diff --git a/nixos/configuration.nix b/nixos/configuration.nix index d6d4e3e..f85e529 100644 --- a/nixos/configuration.nix +++ b/nixos/configuration.nix @@ -127,9 +127,10 @@ # Secrets tooling (required for sops-nix secret decryption and manual re-encryption) sops age - # Python runtime (hard requirement for appctl and gitops_dispatcher.py) + # Python runtime (hard requirement for appctl, core_manifest, and gitops_dispatcher.py) (python3.withPackages (ps: with ps; [ pyyaml + pydantic ])) # Modern shell utilities eza # ls replacement diff --git a/nixos/modules/homeserver.nix b/nixos/modules/homeserver.nix index cc9dd81..d68ce79 100644 --- a/nixos/modules/homeserver.nix +++ b/nixos/modules/homeserver.nix @@ -66,7 +66,15 @@ wants = [ "network-online.target" ]; wantedBy = [ "multi-user.target" ]; - path = with pkgs; [ git docker docker-compose python3 coreutils bash openssh ]; + path = with pkgs; [ + git + docker + docker-compose + (python3.withPackages (ps: with ps; [ pyyaml pydantic ])) + coreutils + bash + openssh + ]; environment = { GITOPS_SECRET_FILE = config.sops.secrets."gitops/webhook_secret".path; diff --git a/pyproject.toml b/pyproject.toml index 62e7e85..07af1f0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -5,7 +5,7 @@ description = "Homelab Core platform and orchestration" requires-python = ">=3.13" dependencies = [ "pyyaml>=6.0", - "pydantic>=2.0", + "pydantic>=2.0,<3.0", ] [tool.pyright] diff --git a/uv.lock b/uv.lock index ca27f0f..d23c611 100644 --- a/uv.lock +++ b/uv.lock @@ -22,7 +22,7 @@ dependencies = [ [package.metadata] requires-dist = [ - { name = "pydantic", specifier = ">=2.0" }, + { name = "pydantic", specifier = ">=2.0,<3.0" }, { name = "pyyaml", specifier = ">=6.0" }, ]