From 58f5a8cd43fae31f7c92333a9d75f0d7f974e766 Mon Sep 17 00:00:00 2001
From: lilly
Date: Sat, 18 Jul 2026 21:09:45 +0200
Subject: [PATCH] init nix based devshell
---
.envrc.dist | 3 +++
flake.lock | 61 +++++++++++++++++++++++++++++++++++++++++++++++++++++
flake.nix | 34 +++++++++++++++++++++++++++++
3 files changed, 98 insertions(+)
create mode 100644 flake.lock
create mode 100644 flake.nix
diff --git a/.envrc.dist b/.envrc.dist
index 09c6b28..665b4c9 100644
--- a/.envrc.dist
+++ b/.envrc.dist
@@ -1,4 +1,7 @@
# integrate this into your own .envrc file with `source_env .envrc.dist`
+if has nix; then
+ use flake
+fi
watch_file api/pyproject.toml \
api/uv.lock
diff --git a/flake.lock b/flake.lock
new file mode 100644
index 0000000..c9db7fc
--- /dev/null
+++ b/flake.lock
@@ -0,0 +1,61 @@
+{
+ "nodes": {
+ "flake-utils": {
+ "inputs": {
+ "systems": "systems"
+ },
+ "locked": {
+ "lastModified": 1731533236,
+ "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
+ "owner": "numtide",
+ "repo": "flake-utils",
+ "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
+ "type": "github"
+ },
+ "original": {
+ "owner": "numtide",
+ "repo": "flake-utils",
+ "type": "github"
+ }
+ },
+ "nixpkgs": {
+ "locked": {
+ "lastModified": 1784356753,
+ "narHash": "sha256-12KrbMiWLcf8m7pCvAtZh1ZrgF85ZXDXvfR/fWTKy84=",
+ "owner": "nixos",
+ "repo": "nixpkgs",
+ "rev": "61b7c44c4073f0b827768aff0049561b5110ea5a",
+ "type": "github"
+ },
+ "original": {
+ "owner": "nixos",
+ "ref": "nixos-unstable",
+ "repo": "nixpkgs",
+ "type": "github"
+ }
+ },
+ "root": {
+ "inputs": {
+ "flake-utils": "flake-utils",
+ "nixpkgs": "nixpkgs"
+ }
+ },
+ "systems": {
+ "locked": {
+ "lastModified": 1681028828,
+ "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
+ "owner": "nix-systems",
+ "repo": "default",
+ "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
+ "type": "github"
+ },
+ "original": {
+ "owner": "nix-systems",
+ "repo": "default",
+ "type": "github"
+ }
+ }
+ },
+ "root": "root",
+ "version": 7
+}
diff --git a/flake.nix b/flake.nix
new file mode 100644
index 0000000..89d8b8c
--- /dev/null
+++ b/flake.nix
@@ -0,0 +1,34 @@
+{
+ description = "dooris";
+
+ inputs = {
+ nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
+ flake-utils.url = "github:numtide/flake-utils";
+ };
+
+ outputs =
+ {
+ self,
+ nixpkgs,
+ flake-utils,
+ }:
+ flake-utils.lib.eachDefaultSystem (
+ system:
+ let
+ pkgs = import nixpkgs { system = system; };
+ in
+ {
+ devShells.default = pkgs.mkShell {
+ packages = with pkgs; [
+ uv
+ pre-commit
+ ruff
+ python3
+ pnpm
+ rustc
+ cargo
+ ];
+ };
+ }
+ );
+}