Nix error after linking custom domain

I have a replit that uses Django and recently linked a custom domain. After doing that the program enters a crash loop every time I try to run it.
The error shown is the following:

nix error: building nix env: exit status 1
Output has been trimmed to the last 20 lines
evaluating file '/nix/store/x8dbrija74rnw16hrbw5r5apx9k81giz-nixpkgs-21.11-src/pkgs/top-level/config.nix'
evaluating file '/nix/store/x8dbrija74rnw16hrbw5r5apx9k81giz-nixpkgs-21.11-src/lib/options.nix'
evaluating file '/nix/store/x8dbrija74rnw16hrbw5r5apx9k81giz-nixpkgs-21.11-src/pkgs/stdenv/linux/default.nix'
evaluating file '/nix/store/x8dbrija74rnw16hrbw5r5apx9k81giz-nixpkgs-21.11-src/pkgs/top-level/stage.nix'
evaluating file '/nix/store/x8dbrija74rnw16hrbw5r5apx9k81giz-nixpkgs-21.11-src/pkgs/stdenv/adapters.nix'
evaluating file '/nix/store/x8dbrija74rnw16hrbw5r5apx9k81giz-nixpkgs-21.11-src/pkgs/build-support/trivial-builders.nix'
evaluating file '/nix/store/x8dbrija74rnw16hrbw5r5apx9k81giz-nixpkgs-21.11-src/pkgs/top-level/splice.nix'
evaluating file '/nix/store/x8dbrija74rnw16hrbw5r5apx9k81giz-nixpkgs-21.11-src/pkgs/top-level/all-packages.nix'
evaluating file '/nix/store/x8dbrija74rnw16hrbw5r5apx9k81giz-nixpkgs-21.11-src/pkgs/top-level/aliases.nix'
evaluating file '/nix/store/1m2fssfawvn6krbv3rc6hmq7xaa45v5a-nixpkgs-stable-21_11-21.11.tar.gz/nixpkgs-stable-21_11/overlay.nix'
evaluating file '/nix/store/x8dbrija74rnw16hrbw5r5apx9k81giz-nixpkgs-21.11-src/pkgs/stdenv/generic/default.nix'
evaluating file '/nix/store/x8dbrija74rnw16hrbw5r5apx9k81giz-nixpkgs-21.11-src/lib/customisation.nix'
evaluating file '/nix/store/x8dbrija74rnw16hrbw5r5apx9k81giz-nixpkgs-21.11-src/pkgs/tools/text/gawk/default.nix'
evaluating file '/nix/store/x8dbrija74rnw16hrbw5r5apx9k81giz-nixpkgs-21.11-src/pkgs/servers/x11/xorg/default.nix'
evaluating file '/nix/store/x8dbrija74rnw16hrbw5r5apx9k81giz-nixpkgs-21.11-src/pkgs/servers/x11/xorg/overrides.nix'
evaluating file '/nix/store/x8dbrija74rnw16hrbw5r5apx9k81giz-nixpkgs-21.11-src/pkgs/stdenv/generic/make-derivation.nix'
evaluating file '/nix/store/x8dbrija74rnw16hrbw5r5apx9k81giz-nixpkgs-21.11-src/pkgs/build-support/mkshell/default.nix'
evaluating file '/home/runner/DriveOrFly/replit.nix'
error: undefined variable 'os' at /home/runner/DriveOrFly/replit.nix:3:17

Any guidance to what is causing this will be appreciated.

Hey, @RobertoMora welcome to the forums!

Can you please share a link to the repl?

https://replit.com/@robfish/DriveOrFly#manage.py

Hi @RobertoMora thanks for sharing the link to your Repl.

The issue is in your replit.nix file

{ pkgs }: {
  deps = [
    pkgs.import os          <--- this line here
    pkgs.python38Full
  ];
  env = {
    PYTHONBIN = "${pkgs.python38Full}/bin/python3.8";
    LANG = "en_US.UTF-8";
  };
}

Hmm, I haven’t touched that file so it is weird that it is giving issues.

Thanks @RobertoMora could you please try creating a new Nix Repl and let me know if the issue is the same as before?