From 782bbc4d8e4b07e49d0e9ca7f0303752e9e391a9 Mon Sep 17 00:00:00 2001
From: Kiara Grouwstra <kiara@procolix.eu>
Date: Thu, 13 Mar 2025 13:50:49 +0100
Subject: [PATCH] move from documenting to automating configurable-impure-env

---
 panel/README.md          |  5 -----
 panel/src/panel/views.py | 15 +++++++++++++--
 2 files changed, 13 insertions(+), 7 deletions(-)

diff --git a/panel/README.md b/panel/README.md
index cc01c82b..5dcab93c 100644
--- a/panel/README.md
+++ b/panel/README.md
@@ -4,11 +4,6 @@ The Fediversity Panel is a web service for managing Fediversity deployments with
 
 ## Development
 
-- In your [nix.conf](https://nix.dev/manual/nix/latest/command-ref/conf-file) (Nix) / `nix.settings` (NixOS),
-to your [`experimental-features`](https://nix.dev/manual/nix/latest/command-ref/conf-file#conf-experimental-features)
-add [`configurable-impure-env`](https://nix.dev/manual/nix/latest/development/experimental-features#xp-feature-configurable-impure-env).
-Note that this features is only available in Nix, not in Lix.
-
 - To obtain all tools related to this project, enter the development environment with `nix-shell`.
 
   If you want to do that automatically on entering this directory:
diff --git a/panel/src/panel/views.py b/panel/src/panel/views.py
index cf2e232b..4077ebbe 100644
--- a/panel/src/panel/views.py
+++ b/panel/src/panel/views.py
@@ -56,8 +56,19 @@ class ConfigurationForm(LoginRequiredMixin, FormView):
             }
             print(f"env: {env}")
             print(f"Path: {os.getcwd()}/..")
-            subprocess.run(["nix", "develop", "--command", "nixops4", "--show-trace",
-                           "--verbose", "apply", "test"], cwd=os.getenv("REPO_DIR") or f"{os.getcwd()}/..", env=env)
+            cmd = [
+                "nix",
+                "develop",
+                "--extra-experimental-features",
+                "configurable-impure-env",
+                "--command",
+                "nixops4",
+                "--show-trace",
+                "--verbose",
+                "apply",
+                "test",
+            ]
+            subprocess.run(cmd, cwd=os.getenv("REPO_DIR") or f"{os.getcwd()}/..", env=env)
         return obj
 
     # TODO(@fricklerhandwerk):