From a891ec56a651af2b75d740c7f7c4c6bbf89bfb92 Mon Sep 17 00:00:00 2001 From: Tom Hubrecht Date: Mon, 3 Oct 2022 10:34:06 +0200 Subject: [PATCH] dev: add nixos setup --- .envrc | 1 + .gitignore | 3 ++- shell.nix | 22 ++++++++++++++++++++++ 3 files changed, 25 insertions(+), 1 deletion(-) create mode 100644 .envrc create mode 100644 shell.nix diff --git a/.envrc b/.envrc new file mode 100644 index 00000000..1d953f4b --- /dev/null +++ b/.envrc @@ -0,0 +1 @@ +use nix diff --git a/.gitignore b/.gitignore index 347d4b78..20e228a4 100644 --- a/.gitignore +++ b/.gitignore @@ -18,4 +18,5 @@ media/ .cache # VSCode -.vscode/ \ No newline at end of file +.vscode/ +.direnv \ No newline at end of file diff --git a/shell.nix b/shell.nix new file mode 100644 index 00000000..be49fa83 --- /dev/null +++ b/shell.nix @@ -0,0 +1,22 @@ +let + mach-nix = import + (builtins.fetchGit { + url = "https://github.com/DavHau/mach-nix"; + ref = "refs/tags/3.5.0"; + }) + { }; + + requirements = builtins.readFile ./requirements.txt; + + requirements-dev = '' + django-debug-toolbar + ipython + black + isort + flake8 + ''; +in + +mach-nix.mkPythonShell { + requirements = requirements + requirements-dev; +}