Initial setup

This commit is contained in:
Quirin Kinader 2025-08-20 20:42:35 +02:00
commit 9c08272621
6 changed files with 109 additions and 0 deletions

2
.gitignore vendored Normal file
View file

@ -0,0 +1,2 @@
*.lock
*.venv

1
README.md Normal file
View file

@ -0,0 +1 @@
# Gardening Automation and Monitoring

84
flake.nix Normal file
View file

@ -0,0 +1,84 @@
{
description = "Gardening Automation and Monitoring";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
pyproject-nix = {
url = "github:pyproject-nix/pyproject.nix";
inputs.nixpkgs.follows = "nixpkgs";
};
uv2nix = {
url = "github:pyproject-nix/uv2nix";
inputs.pyproject-nix.follows = "pyproject-nix";
inputs.nixpkgs.follows = "nixpkgs";
};
pyproject-build-systems = {
url = "github:pyproject-nix/build-system-pkgs";
inputs.pyproject-nix.follows = "pyproject-nix";
inputs.uv2nix.follows = "uv2nix";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs =
{
self,
nixpkgs,
uv2nix,
pyproject-nix,
pyproject-build-systems,
...
}:
let
inherit (nixpkgs) lib;
workspace = uv2nix.lib.workspace.loadWorkspace { workspaceRoot = ./.; };
overlay = workspace.mkPyprojectOverlay {
sourcePreference = "wheel";
};
pyprojectOverrides = _final: _prev: {
};
pkgs = nixpkgs.legacyPackages.x86_64-linux;
python = pkgs.python312;
pythonSet =
(pkgs.callPackage pyproject-nix.build.packages {
inherit python;
}).overrideScope
(
lib.composeManyExtensions [
pyproject-build-systems.overlays.default
overlay
pyprojectOverrides
]
);
in
{
packages.x86_64-linux.default = pythonSet.mkVirtualEnv "gardening_iot" workspace.deps.default;
devShells.x86_64-linux = {
impure = pkgs.mkShell {
packages = [
python
pkgs.uv
];
env =
{
UV_PYTHON_DOWNLOADS = "never";
UV_PYTHON = python.interpreter;
}
// lib.optionalAttrs pkgs.stdenv.isLinux {
LD_LIBRARY_PATH = lib.makeLibraryPath pkgs.pythonManylinuxPackages.manylinux1;
};
shellHook = ''
unset PYTHONPATH
'';
};
};
};
}

5
main.py Normal file
View file

@ -0,0 +1,5 @@
def main():
print("hhhello")
if __name__ == "__main__":
main()

17
pyproject.toml Normal file
View file

@ -0,0 +1,17 @@
[project]
name = "gardening_iot"
version = "0.1.0"
description = "Garden Automation and Monitoring"
readme = "README.md"
requires-python = ">=3.12"
dependencies = [
]
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[dependency-groups]
dev = [
"ruff>=0.6.7",
]

View file