From 6dd443150601ca310638073158a67b2c08c086ac Mon Sep 17 00:00:00 2001 From: Luke Granger-Brown Date: Thu, 12 Oct 2023 20:12:22 +0000 Subject: [PATCH] drop my own netbox build in favour of nixpkgs --- ci-root.nix | 2 +- nix/pkgs/default.nix | 1 - nix/pkgs/netbox/default.nix | 105 -- nix/pkgs/netbox/python-packages.nix | 1416 --------------------------- ops/nixos/bvm-netbox/default.nix | 250 ++--- ops/vault/cfg/config.nix | 2 + 6 files changed, 110 insertions(+), 1666 deletions(-) delete mode 100644 nix/pkgs/netbox/default.nix delete mode 100644 nix/pkgs/netbox/python-packages.nix diff --git a/ci-root.nix b/ci-root.nix index e4b9cf5d47..481d68a339 100644 --- a/ci-root.nix +++ b/ci-root.nix @@ -36,7 +36,7 @@ let home-manager = depot.ops.home-manager-ext.built; }; aarch64-linux = builtins.removeAttrs x86_64-linux [ "home-manager" "pkg-authentik" ] // { - pkgs = builtins.removeAttrs x86_64-linux.pkgs [ "lutris" "plex-pass" "sheepshaver" "fr24feed" "netbox" "javaws-env" "copybara" ]; + pkgs = builtins.removeAttrs x86_64-linux.pkgs [ "lutris" "plex-pass" "sheepshaver" "fr24feed" "javaws-env" "copybara" ]; }; x86_64-darwin = { home-manager = { diff --git a/nix/pkgs/default.nix b/nix/pkgs/default.nix index 6076deaff1..8e07214d9c 100644 --- a/nix/pkgs/default.nix +++ b/nix/pkgs/default.nix @@ -30,7 +30,6 @@ mercurial = pkgs.mercurialFull.withExtensions (pm: with pm; [ hg-evolve ]); - netbox = pkgs.python3Packages.callPackage ./netbox {}; ubi_reader = pkgs.python3Packages.callPackage ./ubi_reader {}; prometheus-bird-exporter-lfty = pkgs.callPackage ./prometheus-bird-exporter-lfty.nix {}; eapol-test = pkgs.callPackage ./eapol-test.nix {}; diff --git a/nix/pkgs/netbox/default.nix b/nix/pkgs/netbox/default.nix deleted file mode 100644 index 38d9ed2072..0000000000 --- a/nix/pkgs/netbox/default.nix +++ /dev/null @@ -1,105 +0,0 @@ -{ buildPythonApplication -, overrideScope -, fetchFromGitHub -, lib -, callPackage -, configuration ? "" -, psycopg2 -}: - -let - deps = overrideScope (callPackage ./python-packages.nix {}); -in -buildPythonApplication rec { - pname = "netbox"; - version = "3.2.5"; - - src = fetchFromGitHub { - owner = "netbox-community"; - repo = pname; - rev = "v${version}"; - sha256 = "0blqlfl7djl1zb92cvqndy5l8drn0axjjqvhjc1q881h3sif123w"; - }; - - propagatedBuildInputs = (with deps; [ - bleach - django - django-cors-headers - django-debug-toolbar - django-filter - django-graphiql-debug-toolbar - django-mptt - django-pglocks - django-prometheus - django-redis - django-rq - django-tables2 - django-taggit - django-timezone-field - djangorestframework - drf-yasg - graphene-django - gunicorn - Jinja2 - Markdown - markdown-include - mkdocs-material - mkdocstrings - mkdocstrings-python-legacy - netaddr - pillow - PyYAML - sentry-sdk - social-auth-app-django - social-auth-core - svgwrite - tablib - tzdata - jsonschema - - django-storages - ]) ++ [ - psycopg2 - ]; - - format = "other"; - - buildPhase = '' - runHook preBuild - # Do nothing. - runHook postBuild - ''; - - passAsFile = [ "configuration" ]; - inherit configuration; - - installPhase = '' - runHook preInstall - mkdir -p $out/share/netbox - cp -R . $out/share/netbox - PYVER="$(python -c "import sys; print(f'{sys.version_info.major}.{sys.version_info.minor}')")" - PYDIR="$out/lib/python$PYVER" - mkdir -p $PYDIR - ln -s $out/share/netbox/netbox $PYDIR/site-packages - mkdir -p $out/bin - cp $out/share/netbox/netbox/manage.py $out/bin/netbox-manage - - cat <<"EOF" >$out/bin/netbox-gunicorn - #!/usr/bin/python - import sys - from gunicorn.app.wsgiapp import run - if __name__ == '__main__': - sys.exit(run()) - EOF - chmod +x $out/bin/netbox-gunicorn - - cp $out/share/netbox/netbox/netbox/configuration_testing.py $out/share/netbox/netbox/netbox/configuration.py - PYTHONPATH=$PYDIR/site-packages:$PYTHONPATH python $out/bin/netbox-manage collectstatic --no-input - - cp $configurationPath $out/share/netbox/netbox/netbox/configuration.py - - runHook postInstall - ''; - - passthru.deps = deps; -} diff --git a/nix/pkgs/netbox/python-packages.nix b/nix/pkgs/netbox/python-packages.nix deleted file mode 100644 index 9f2532d14c..0000000000 --- a/nix/pkgs/netbox/python-packages.nix +++ /dev/null @@ -1,1416 +0,0 @@ -# Generated by pip2nix 0.8.0.dev1 -# See https://github.com/nix-community/pip2nix - -{ pkgs, fetchurl, fetchgit, fetchhg }: - -self: super: { - "Django" = self.django; - "django" = super.buildPythonPackage rec { - pname = "Django"; - version = "4.0.5"; - src = fetchurl { - url = "https://files.pythonhosted.org/packages/ec/71/950794da9635865d27c92a6955083264eabb004c2c12c077036194620823/Django-4.0.5-py3-none-any.whl"; - sha256 = "1ngj7ddymn7c8rlzf4n2licgib0ghpzxal7v6g4i5dmid8my8ajh"; - }; - format = "wheel"; - doCheck = false; - buildInputs = []; - checkInputs = []; - nativeBuildInputs = []; - propagatedBuildInputs = [ - self."asgiref" - self."sqlparse" - ]; - }; - "Jinja2" = super.buildPythonPackage rec { - pname = "Jinja2"; - version = "3.1.2"; - src = fetchurl { - url = "https://files.pythonhosted.org/packages/bc/c3/f068337a370801f372f2f8f6bad74a5c140f6fda3d9de154052708dd3c65/Jinja2-3.1.2-py3-none-any.whl"; - sha256 = "0q9a30x046p3wvbgx598g4lmxwwykk0vjsjl21khx7r3zq5r7230"; - }; - format = "wheel"; - doCheck = false; - buildInputs = []; - checkInputs = []; - nativeBuildInputs = []; - propagatedBuildInputs = [ - self."MarkupSafe" - ]; - }; - "Markdown" = super.buildPythonPackage rec { - pname = "Markdown"; - version = "3.3.7"; - src = fetchurl { - url = "https://files.pythonhosted.org/packages/f3/df/ca72f352e15b6f8ce32b74af029f1189abffb906f7c137501ffe69c98a65/Markdown-3.3.7-py3-none-any.whl"; - sha256 = "08f66i39yc4yiz453mamz0p5makwws7alc96x969m60wdsd49npm"; - }; - format = "wheel"; - doCheck = false; - buildInputs = []; - checkInputs = []; - nativeBuildInputs = []; - propagatedBuildInputs = [ - self."importlib-metadata" - ]; - }; - "MarkupSafe" = super.buildPythonPackage rec { - pname = "MarkupSafe"; - version = "2.1.1"; - src = fetchurl { - url = "https://files.pythonhosted.org/packages/1d/97/2288fe498044284f39ab8950703e88abbac2abbdf65524d576157af70556/MarkupSafe-2.1.1.tar.gz"; - sha256 = "0jqxp5sfrc0byp6bk0gwdmildi4mck2gprp42afri3z4r5y1k4bz"; - }; - format = "setuptools"; - doCheck = false; - buildInputs = []; - checkInputs = []; - nativeBuildInputs = []; - propagatedBuildInputs = []; - }; - "Pillow" = super.buildPythonPackage rec { - pname = "Pillow"; - version = "9.1.1"; - src = fetchurl { - url = "https://files.pythonhosted.org/packages/43/6e/59853546226ee6200f9ba6e574d11604b60ad0754d2cbd1c8f3246b70418/Pillow-9.1.1.tar.gz"; - sha256 = "1809hdchs99g1vpd8i99qz9h1jbyiv3qf7fiydjpagdm76cm60km"; - }; - format = "setuptools"; - doCheck = false; - buildInputs = []; - checkInputs = []; - nativeBuildInputs = []; - propagatedBuildInputs = []; - }; - "PyJWT" = super.buildPythonPackage rec { - pname = "PyJWT"; - version = "2.4.0"; - src = fetchurl { - url = "https://files.pythonhosted.org/packages/1c/fb/b82e9601b00d88cf8bbee1f39b855ae773f9d5bcbcedb3801b2f72460696/PyJWT-2.4.0-py3-none-any.whl"; - sha256 = "1bvdnar53s87bny9vnxsrivgc69s5z3gvwgai1f4zg9dyd9x5lbj"; - }; - format = "wheel"; - doCheck = false; - buildInputs = []; - checkInputs = []; - nativeBuildInputs = []; - propagatedBuildInputs = []; - }; - "PyYAML" = super.buildPythonPackage rec { - pname = "PyYAML"; - version = "6.0"; - src = fetchurl { - url = "https://files.pythonhosted.org/packages/36/2b/61d51a2c4f25ef062ae3f74576b01638bebad5e045f747ff12643df63844/PyYAML-6.0.tar.gz"; - sha256 = "18imkjacvpxfgg1lbpraqywx3j7hr5dv99d242byqvrh2jf53yv8"; - }; - format = "setuptools"; - doCheck = false; - buildInputs = []; - checkInputs = []; - nativeBuildInputs = []; - propagatedBuildInputs = []; - }; - "aniso8601" = super.buildPythonPackage rec { - pname = "aniso8601"; - version = "7.0.0"; - src = fetchurl { - url = "https://files.pythonhosted.org/packages/45/a4/b4fcadbdab46c2ec2d2f6f8b4ab3f64fd0040789ac7f065eba82119cd602/aniso8601-7.0.0-py2.py3-none-any.whl"; - sha256 = "0yqccz4cqq96y0hln02ksjva4j8zwf357vr7n8czf6gn97wln2ni"; - }; - format = "wheel"; - doCheck = false; - buildInputs = []; - checkInputs = []; - nativeBuildInputs = []; - propagatedBuildInputs = []; - }; - "asgiref" = super.buildPythonPackage rec { - pname = "asgiref"; - version = "3.5.2"; - src = fetchurl { - url = "https://files.pythonhosted.org/packages/af/6d/ea3a5c3027c3f14b0321cd4f7e594c776ebe64e4b927432ca6917512a4f7/asgiref-3.5.2-py3-none-any.whl"; - sha256 = "1i7sbb887dysd7ymgamjb7lhq44rgcmxpw9nj4l5g1xfjavq0a0x"; - }; - format = "wheel"; - doCheck = false; - buildInputs = []; - checkInputs = []; - nativeBuildInputs = []; - propagatedBuildInputs = []; - }; - "async-timeout" = super.buildPythonPackage rec { - pname = "async-timeout"; - version = "4.0.2"; - src = fetchurl { - url = "https://files.pythonhosted.org/packages/d6/c1/8991e7c5385b897b8c020cdaad718c5b087a6626d1d11a23e1ea87e325a7/async_timeout-4.0.2-py3-none-any.whl"; - sha256 = "0g1v719nh6l516d6f7cq3j2zbz9cwhbf99ficqyl21qdypyf98cc"; - }; - format = "wheel"; - doCheck = false; - buildInputs = []; - checkInputs = []; - nativeBuildInputs = []; - propagatedBuildInputs = []; - }; - "bleach" = super.buildPythonPackage rec { - pname = "bleach"; - version = "5.0.0"; - src = fetchurl { - url = "https://files.pythonhosted.org/packages/35/8b/bad37525e7ef0669f013059affb3bbcd9311a24d63eda96723339ee0aab7/bleach-5.0.0-py3-none-any.whl"; - sha256 = "18bajbjmc8jh9nvybqb2az8id2h4v07q2gfcja6cidaksa3gx888"; - }; - format = "wheel"; - doCheck = false; - buildInputs = []; - checkInputs = []; - nativeBuildInputs = []; - propagatedBuildInputs = [ - self."six" - self."webencodings" - ]; - }; - #"certifi" = super.buildPythonPackage rec { - # pname = "certifi"; - # version = "2022.6.15"; - # src = fetchurl { - # url = "https://files.pythonhosted.org/packages/e9/06/d3d367b7af6305b16f0d28ae2aaeb86154fa91f144f036c2d5002a5a202b/certifi-2022.6.15-py3-none-any.whl"; - # sha256 = "04l46xlyyyg7cwdvk2h7s93kbb1qci7l2scbbzbijiz8amfl31py"; - # }; - # format = "wheel"; - # doCheck = false; - # buildInputs = []; - # checkInputs = []; - # nativeBuildInputs = []; - # propagatedBuildInputs = []; - #}; - #"charset-normalizer" = super.buildPythonPackage rec { - # pname = "charset-normalizer"; - # version = "2.0.12"; - # src = fetchurl { - # url = "https://files.pythonhosted.org/packages/06/b3/24afc8868eba069a7f03650ac750a778862dc34941a4bebeb58706715726/charset_normalizer-2.0.12-py3-none-any.whl"; - # sha256 = "1pxim0sfz7gq157k9kv88kxxzvgnid1ip0maxas3jyxipnzfv0b8"; - # }; - # format = "wheel"; - # doCheck = false; - # buildInputs = []; - # checkInputs = []; - # nativeBuildInputs = []; - # propagatedBuildInputs = []; - #}; - "click" = super.buildPythonPackage rec { - pname = "click"; - version = "8.1.3"; - src = fetchurl { - url = "https://files.pythonhosted.org/packages/c2/f1/df59e28c642d583f7dacffb1e0965d0e00b218e0186d7858ac5233dce840/click-8.1.3-py3-none-any.whl"; - sha256 = "0j6vn6ayxq1bqs1v64r90sarg05hj6rxj4w29vs0k9hmrcrq2kdv"; - }; - format = "wheel"; - doCheck = false; - buildInputs = []; - checkInputs = []; - nativeBuildInputs = []; - propagatedBuildInputs = []; - }; - "coreapi" = super.buildPythonPackage rec { - pname = "coreapi"; - version = "2.3.3"; - src = fetchurl { - url = "https://files.pythonhosted.org/packages/fc/3a/9dedaad22962770edd334222f2b3c3e7ad5e1c8cab1d6a7992c30329e2e5/coreapi-2.3.3-py2.py3-none-any.whl"; - sha256 = "1wz65vsnr9i6fz0qx6m2m6xq1bb3dxkfbvgr1pqp3qfksqcd2fdz"; - }; - format = "wheel"; - doCheck = false; - buildInputs = []; - checkInputs = []; - nativeBuildInputs = []; - propagatedBuildInputs = [ - self."coreschema" - self."itypes" - self."requests" - self."uritemplate" - ]; - }; - "coreschema" = super.buildPythonPackage rec { - pname = "coreschema"; - version = "0.0.4"; - src = fetchurl { - url = "https://files.pythonhosted.org/packages/93/08/1d105a70104e078718421e6c555b8b293259e7fc92f7e9a04869947f198f/coreschema-0.0.4.tar.gz"; - sha256 = "01qn9bfkklpjkr0zn6bd5fr372n1jd5p455scw4ap0nl0xh500wm"; - }; - format = "setuptools"; - doCheck = false; - buildInputs = []; - checkInputs = []; - nativeBuildInputs = []; - propagatedBuildInputs = [ - self."Jinja2" - ]; - }; - "defusedxml" = super.buildPythonPackage rec { - pname = "defusedxml"; - version = "0.7.1"; - src = fetchurl { - url = "https://files.pythonhosted.org/packages/07/6c/aa3f2f849e01cb6a001cd8554a88d4c77c5c1a31c95bdf1cf9301e6d9ef4/defusedxml-0.7.1-py2.py3-none-any.whl"; - sha256 = "0qca37v5iv0304hrl9pzad4jpnxfrnv449cyi768c0kp53jfflm3"; - }; - format = "wheel"; - doCheck = false; - buildInputs = []; - checkInputs = []; - nativeBuildInputs = []; - propagatedBuildInputs = []; - }; - "deprecated" = super.buildPythonPackage rec { - pname = "deprecated"; - version = "1.2.13"; - src = fetchurl { - url = "https://files.pythonhosted.org/packages/51/6a/c3a0408646408f7283b7bc550c30a32cc791181ec4618592eec13e066ce3/Deprecated-1.2.13-py2.py3-none-any.whl"; - sha256 = "0vf7fvqcmf3swqlqz7v2fnza0chlaljcb4sxg6lyxif82hz6wxb4"; - }; - format = "wheel"; - doCheck = false; - buildInputs = []; - checkInputs = []; - nativeBuildInputs = []; - propagatedBuildInputs = [ - self."wrapt" - ]; - }; - "django-cors-headers" = super.buildPythonPackage rec { - pname = "django-cors-headers"; - version = "3.13.0"; - src = fetchurl { - url = "https://files.pythonhosted.org/packages/db/e2/912cdc408f7ddc07967e94c3d785389c36fbfdcb48755393fbf65a02aabf/django_cors_headers-3.13.0-py3-none-any.whl"; - sha256 = "1x3w93a1q0kzl2r29jvh6ah18yj1n9pakfxlyrfjkwpinn1jir1p"; - }; - format = "wheel"; - doCheck = false; - buildInputs = []; - checkInputs = []; - nativeBuildInputs = []; - propagatedBuildInputs = [ - self."Django" - ]; - }; - "django-debug-toolbar" = super.buildPythonPackage rec { - pname = "django-debug-toolbar"; - version = "3.4.0"; - src = fetchurl { - url = "https://files.pythonhosted.org/packages/74/a3/8c4b1da1eed676631623872e8862c8fbc15f8e12eab7aef8e56768797d28/django_debug_toolbar-3.4.0-py3-none-any.whl"; - sha256 = "10xv77j1yjk05vilmcvp4fwk3h0z2dnkl7k47nsmgfq5vklw5ha2"; - }; - format = "wheel"; - doCheck = false; - buildInputs = []; - checkInputs = []; - nativeBuildInputs = []; - propagatedBuildInputs = [ - self."Django" - self."sqlparse" - ]; - }; - "django-filter" = super.buildPythonPackage rec { - pname = "django-filter"; - version = "22.1"; - src = fetchurl { - url = "https://files.pythonhosted.org/packages/58/99/3dc8a7d997a18596c15f588690d46e9802d983f6c1486813ec4db018c481/django_filter-22.1-py3-none-any.whl"; - sha256 = "1sw709ggzripvbbd0idykxjd81f9qjz1bx37199f69q1fqs9whpd"; - }; - format = "wheel"; - doCheck = false; - buildInputs = []; - checkInputs = []; - nativeBuildInputs = []; - propagatedBuildInputs = [ - self."Django" - ]; - }; - "django-graphiql-debug-toolbar" = super.buildPythonPackage rec { - pname = "django-graphiql-debug-toolbar"; - version = "0.2.0"; - src = fetchurl { - url = "https://files.pythonhosted.org/packages/89/20/01a382fcddafea07065486cbc2d21b83eaa1c57e3a0baa0ab6cb103c12fb/django_graphiql_debug_toolbar-0.2.0-py3-none-any.whl"; - sha256 = "0xvpfx0bxh1ba1637hxk4jzl4is52s7x5g37fnh9lsbbvx5lxgw5"; - }; - format = "wheel"; - doCheck = false; - buildInputs = []; - checkInputs = []; - nativeBuildInputs = []; - propagatedBuildInputs = [ - self."Django" - self."django-debug-toolbar" - self."graphene-django" - ]; - }; - "django-js-asset" = super.buildPythonPackage rec { - pname = "django-js-asset"; - version = "2.0.0"; - src = fetchurl { - url = "https://files.pythonhosted.org/packages/89/dd/67936526e547dd14ca4e5d13ab1655bc4aefa410f092ad13de3a085a3d51/django_js_asset-2.0.0-py3-none-any.whl"; - sha256 = "08zr97j4cjik3nlxp6q61ksvi0b56nmw4za8y3d7slw2sq0g7yc6"; - }; - format = "wheel"; - doCheck = false; - buildInputs = []; - checkInputs = []; - nativeBuildInputs = []; - propagatedBuildInputs = [ - self."Django" - ]; - }; - "django-mptt" = super.buildPythonPackage rec { - pname = "django-mptt"; - version = "0.13.4"; - src = fetchurl { - url = "https://files.pythonhosted.org/packages/ab/b1/e9bf441448b880119f6a77c74a9555a0ef9dbba4ab5403b65abb12a5998f/django_mptt-0.13.4-py3-none-any.whl"; - sha256 = "1izmqdmzs4yplanrjdslv6n8ryhdfmd1a96rgsarf7g339i5nx3m"; - }; - format = "wheel"; - doCheck = false; - buildInputs = []; - checkInputs = []; - nativeBuildInputs = []; - propagatedBuildInputs = [ - self."django-js-asset" - ]; - }; - "django-pglocks" = super.buildPythonPackage rec { - pname = "django-pglocks"; - version = "1.0.4"; - src = fetchurl { - url = "https://files.pythonhosted.org/packages/59/76/2c7d104151316077dcaa103e1d5652ded6c32798c8d706570fb7b48385cb/django-pglocks-1.0.4.tar.gz"; - sha256 = "08smnv249vngr4pfvf3j16dm6fd02q2klrv9cbs8w9mxpxpwcirw"; - }; - format = "setuptools"; - doCheck = false; - buildInputs = []; - checkInputs = []; - nativeBuildInputs = []; - propagatedBuildInputs = [ - self."six" - ]; - }; - "django-prometheus" = super.buildPythonPackage rec { - pname = "django-prometheus"; - version = "2.2.0"; - src = fetchurl { - url = "https://files.pythonhosted.org/packages/f3/26/dbf0111fb13540f35a93a201e1ec759cb7aeaa124665da9673ff51c86b7d/django_prometheus-2.2.0-py2.py3-none-any.whl"; - sha256 = "0z2kwdgy38l8sicz79kjiswy227cfqdvyr17fqs8h2w2v1q6fqg6"; - }; - format = "wheel"; - doCheck = false; - buildInputs = []; - checkInputs = []; - nativeBuildInputs = []; - propagatedBuildInputs = [ - self."prometheus-client" - ]; - }; - "django-redis" = super.buildPythonPackage rec { - pname = "django-redis"; - version = "5.2.0"; - src = fetchurl { - url = "https://files.pythonhosted.org/packages/75/59/35ac380419a4eafcc30660eaf142cbb334b19922c7250254636e406b8b82/django_redis-5.2.0-py3-none-any.whl"; - sha256 = "09i0z6gy58k0i11g87pn60kg66pvqgd2cpb53yhpmb8i5g07s0qx"; - }; - format = "wheel"; - doCheck = false; - buildInputs = []; - checkInputs = []; - nativeBuildInputs = []; - propagatedBuildInputs = [ - self."Django" - self."redis" - ]; - }; - "django-rq" = super.buildPythonPackage rec { - pname = "django-rq"; - version = "2.5.1"; - src = fetchurl { - url = "https://files.pythonhosted.org/packages/4e/d3/c88bfa005a49c0d6ba55251e88cb87d17fa4871c0232a3ae927e00819c78/django_rq-2.5.1-py2.py3-none-any.whl"; - sha256 = "0gx095k3rprb7m278gb8k0myl1djvfq01wgd6sgmymcif07f3qbv"; - }; - format = "wheel"; - doCheck = false; - buildInputs = []; - checkInputs = []; - nativeBuildInputs = []; - propagatedBuildInputs = [ - self."Django" - self."redis" - self."rq" - ]; - }; - "django-tables2" = super.buildPythonPackage rec { - pname = "django-tables2"; - version = "2.4.1"; - src = fetchurl { - url = "https://files.pythonhosted.org/packages/e3/96/cff3b64ff703820054acbebf1ec3073a1a8b2e7604f58315dcf9305489c7/django_tables2-2.4.1-py2.py3-none-any.whl"; - sha256 = "0r4sgi84xkxgizy9f14dnxmjdmshhqkkwg3n1svlw6n6szrjnxjh"; - }; - format = "wheel"; - doCheck = false; - buildInputs = []; - checkInputs = []; - nativeBuildInputs = []; - propagatedBuildInputs = [ - self."Django" - ]; - }; - "django-taggit" = super.buildPythonPackage rec { - pname = "django-taggit"; - version = "2.1.0"; - src = fetchurl { - url = "https://files.pythonhosted.org/packages/8f/64/6ca8b92c6cebe43956d27b9c5b7f27cd7e2f04a9407a488f05cd39bf96c7/django_taggit-2.1.0-py3-none-any.whl"; - sha256 = "01adqd0bmf305vivmnv386glaav6ksh18x0h0j9pr5lrzhiplm31"; - }; - format = "wheel"; - doCheck = false; - buildInputs = []; - checkInputs = []; - nativeBuildInputs = []; - propagatedBuildInputs = [ - self."Django" - ]; - }; - "django-timezone-field" = super.buildPythonPackage rec { - pname = "django-timezone-field"; - version = "5.0"; - src = fetchurl { - url = "https://files.pythonhosted.org/packages/c9/c0/1d8b814d74d4a001be436138c5b0fca0a3d3bc32454f19e88ada278121df/django_timezone_field-5.0-py3-none-any.whl"; - sha256 = "1apa4w83ishbq1mz7hnz007ir71r877bha9ras1pxb7fh88237qr"; - }; - format = "wheel"; - doCheck = false; - buildInputs = []; - checkInputs = []; - nativeBuildInputs = []; - propagatedBuildInputs = [ - self."pytz" - ]; - }; - "djangorestframework" = super.buildPythonPackage rec { - pname = "djangorestframework"; - version = "3.13.1"; - src = fetchurl { - url = "https://files.pythonhosted.org/packages/c8/45/2588c7c5a01a7da6822c6ffbc9a731d498c318a803a29ae780ec635ea41d/djangorestframework-3.13.1-py3-none-any.whl"; - sha256 = "1amiz21wc2pgvkl06jynaz6n7li6m4nsnl529gzd31byxmcbzi14"; - }; - format = "wheel"; - doCheck = false; - buildInputs = []; - checkInputs = []; - nativeBuildInputs = []; - propagatedBuildInputs = [ - self."Django" - self."pytz" - ]; - }; - "drf-yasg" = super.buildPythonPackage rec { - pname = "drf-yasg"; - version = "1.20.0"; - src = fetchurl { - url = "https://files.pythonhosted.org/packages/fc/5c/4584321c7a7fd85429f73fd4c3406b09309e3a071e250177739384a4ab48/drf_yasg-1.20.0-py2.py3-none-any.whl"; - sha256 = "0rw2gxmxmbsvvyh4faa985jpga2vk8xbw1zl3b8shcarhyqyawlb"; - }; - format = "wheel"; - doCheck = false; - buildInputs = []; - checkInputs = []; - nativeBuildInputs = []; - propagatedBuildInputs = [ - self."Django" - self."coreapi" - self."coreschema" - self."djangorestframework" - self."inflection" - self."packaging" - self."ruamel.yaml" - self."swagger-spec-validator" - self."uritemplate" - ]; - }; - "ghp-import" = super.buildPythonPackage rec { - pname = "ghp-import"; - version = "2.1.0"; - src = fetchurl { - url = "https://files.pythonhosted.org/packages/f7/ec/67fbef5d497f86283db54c22eec6f6140243aae73265799baaaa19cd17fb/ghp_import-2.1.0-py3-none-any.whl"; - sha256 = "06d64i1jqlfvq5ldb20r4i87a4kz3hgvr2829hyiczw7a1xxsdw3"; - }; - format = "wheel"; - doCheck = false; - buildInputs = []; - checkInputs = []; - nativeBuildInputs = []; - propagatedBuildInputs = [ - self."python-dateutil" - ]; - }; - "graphene" = super.buildPythonPackage rec { - pname = "graphene"; - version = "2.1.9"; - src = fetchurl { - url = "https://files.pythonhosted.org/packages/ef/a2/b3e68706bf45abc2f9d70f099a4b4ca6305779577f4a03458d78fb39cd42/graphene-2.1.9-py2.py3-none-any.whl"; - sha256 = "0s08maz9gdd1hcmigjaq9wz0a1x6lgqmq59ipi910mbw4fqnwi1x"; - }; - format = "wheel"; - doCheck = false; - buildInputs = []; - checkInputs = []; - nativeBuildInputs = []; - propagatedBuildInputs = [ - self."aniso8601" - self."graphql-core" - self."graphql-relay" - self."six" - ]; - }; - "graphene-django" = super.buildPythonPackage rec { - pname = "graphene-django"; - version = "2.15.0"; - src = fetchurl { - url = "https://files.pythonhosted.org/packages/eb/aa/c40236831391abc1f331b79bdb7cc72ce17f63662fc9e261264852e8fe52/graphene_django-2.15.0-py2.py3-none-any.whl"; - sha256 = "1018p6x82jq3vxn6xslqgl7psaagmpsaiwngk9jch28cbwcisrq2"; - }; - format = "wheel"; - doCheck = false; - buildInputs = []; - checkInputs = []; - nativeBuildInputs = []; - propagatedBuildInputs = [ - self."Django" - self."graphene" - self."graphql-core" - self."promise" - self."singledispatch" - self."six" - self."text-unidecode" - ]; - }; - "graphql-core" = super.buildPythonPackage rec { - pname = "graphql-core"; - version = "2.3.2"; - src = fetchurl { - url = "https://files.pythonhosted.org/packages/11/71/d51beba3d8986fa6d8670ec7bcba989ad6e852d5ae99d95633e5dacc53e7/graphql_core-2.3.2-py2.py3-none-any.whl"; - sha256 = "1bavhaayjzsc2zl1bcjdw757a6bcqziwiylmlp2k0pjfa72bmja4"; - }; - format = "wheel"; - doCheck = false; - buildInputs = []; - checkInputs = []; - nativeBuildInputs = []; - propagatedBuildInputs = [ - self."promise" - self."rx" - self."six" - ]; - }; - "graphql-relay" = super.buildPythonPackage rec { - pname = "graphql-relay"; - version = "2.0.1"; - src = fetchurl { - url = "https://files.pythonhosted.org/packages/94/48/6022ea2e89cb936c3b933a0409c6e29bf8a68c050fe87d97f98aff6e5e9e/graphql_relay-2.0.1-py3-none-any.whl"; - sha256 = "0gci1phs4g8abym2w6qhy0nc2yhk47ai2dg7swa3195rdnw4qldc"; - }; - format = "wheel"; - doCheck = false; - buildInputs = []; - checkInputs = []; - nativeBuildInputs = []; - propagatedBuildInputs = [ - self."graphql-core" - self."promise" - self."six" - ]; - }; - "gunicorn" = super.buildPythonPackage rec { - pname = "gunicorn"; - version = "20.1.0"; - src = fetchurl { - url = "https://files.pythonhosted.org/packages/e4/dd/5b190393e6066286773a67dfcc2f9492058e9b57c4867a95f1ba5caf0a83/gunicorn-20.1.0-py3-none-any.whl"; - sha256 = "0zl0g83a90j8gdky0hy43j4d3rd0cxban5gvri52ijxivd3lbk4x"; - }; - format = "wheel"; - doCheck = false; - buildInputs = []; - checkInputs = []; - nativeBuildInputs = []; - propagatedBuildInputs = [ - self."setuptools" - ]; - }; - #"idna" = super.buildPythonPackage rec { - # pname = "idna"; - # version = "3.3"; - # src = fetchurl { - # url = "https://files.pythonhosted.org/packages/04/a2/d918dcd22354d8958fe113e1a3630137e0fc8b44859ade3063982eacd2a4/idna-3.3-py3-none-any.whl"; - # sha256 = "1zrm4xnjas13byafi11ma2q8h5rr1fmjwvi41xp5k07sgw2dvnc4"; - # }; - # format = "wheel"; - # doCheck = false; - # buildInputs = []; - # checkInputs = []; - # nativeBuildInputs = []; - # propagatedBuildInputs = []; - #}; - #"importlib-metadata" = super.buildPythonPackage rec { - # pname = "importlib-metadata"; - # version = "4.12.0"; - # src = fetchurl { - # url = "https://files.pythonhosted.org/packages/d2/a2/8c239dc898138f208dd14b441b196e7b3032b94d3137d9d8453e186967fc/importlib_metadata-4.12.0-py3-none-any.whl"; - # sha256 = "08qcx2d4x212c70c9jy537ha1591riw4zan3b33gv8cyh1ssj0bl"; - # }; - # format = "wheel"; - # doCheck = false; - # buildInputs = []; - # checkInputs = []; - # nativeBuildInputs = []; - # propagatedBuildInputs = [ - # self."zipp" - # ]; - #}; - "inflection" = super.buildPythonPackage rec { - pname = "inflection"; - version = "0.5.1"; - src = fetchurl { - url = "https://files.pythonhosted.org/packages/59/91/aa6bde563e0085a02a435aa99b49ef75b0a4b062635e606dab23ce18d720/inflection-0.5.1-py2.py3-none-any.whl"; - sha256 = "18m80mk55fd1p9dnl1zil1i9p5a2602kvb39vrdg791q15j2p2zk"; - }; - format = "wheel"; - doCheck = false; - buildInputs = []; - checkInputs = []; - nativeBuildInputs = []; - propagatedBuildInputs = []; - }; - "itypes" = super.buildPythonPackage rec { - pname = "itypes"; - version = "1.2.0"; - src = fetchurl { - url = "https://files.pythonhosted.org/packages/3f/bb/3bd99c7cd34d4a123b2903e16da364f6d2078b1c3a3530a8ad105c668104/itypes-1.2.0-py2.py3-none-any.whl"; - sha256 = "1ih4vn34q6abk83j72xl1pw91x08sjr74dkpcbprmll9r9r6inh3"; - }; - format = "wheel"; - doCheck = false; - buildInputs = []; - checkInputs = []; - nativeBuildInputs = []; - propagatedBuildInputs = []; - }; - "jsonschema" = super.buildPythonPackage rec { - pname = "jsonschema"; - version = "3.2.0"; - src = fetchurl { - url = "https://files.pythonhosted.org/packages/c5/8f/51e89ce52a085483359217bc72cdbf6e75ee595d5b1d4b5ade40c7e018b8/jsonschema-3.2.0-py2.py3-none-any.whl"; - sha256 = "0qyidiicwn27ya7r4q7cjbra8gna5vkwnfg1kkp7nmvg47w3qnsf"; - }; - format = "wheel"; - doCheck = false; - buildInputs = []; - checkInputs = []; - nativeBuildInputs = []; - propagatedBuildInputs = [ - self."attrs" - self."pyrsistent" - self."setuptools" - self."six" - ]; - }; - "markdown-include" = super.buildPythonPackage rec { - pname = "markdown-include"; - version = "0.6.0"; - src = fetchurl { - url = "https://files.pythonhosted.org/packages/34/ce/289d5d459c274a59379f79af95f3f36ae29cb9d787206ad9b45dda48e3ce/markdown-include-0.6.0.tar.gz"; - sha256 = "18p4qfhazvskcg6xsdv1np8m1gc1llyabp311xzhqy7p6q76hpbg"; - }; - format = "setuptools"; - doCheck = false; - buildInputs = []; - checkInputs = []; - nativeBuildInputs = []; - propagatedBuildInputs = [ - self."Markdown" - ]; - }; - "mergedeep" = super.buildPythonPackage rec { - pname = "mergedeep"; - version = "1.3.4"; - src = fetchurl { - url = "https://files.pythonhosted.org/packages/2c/19/04f9b178c2d8a15b076c8b5140708fa6ffc5601fb6f1e975537072df5b2a/mergedeep-1.3.4-py3-none-any.whl"; - sha256 = "01q3xxwdg2w9blbv6lf92x6kihr47p8awmbcygcc099bfi85fxvh"; - }; - format = "wheel"; - doCheck = false; - buildInputs = []; - checkInputs = []; - nativeBuildInputs = []; - propagatedBuildInputs = []; - }; - "mkdocs" = super.buildPythonPackage rec { - pname = "mkdocs"; - version = "1.3.0"; - src = fetchurl { - url = "https://files.pythonhosted.org/packages/33/68/5b640fe30386ae27ee904f2fd411572ff7ec7b1cf51f29beb8f5615d1622/mkdocs-1.3.0-py3-none-any.whl"; - sha256 = "1pmck91xr4fassdbj9wwf4xp0s31r2ybgl7fwsimgb1rsw1jpg96"; - }; - format = "wheel"; - doCheck = false; - buildInputs = []; - checkInputs = []; - nativeBuildInputs = []; - propagatedBuildInputs = [ - self."Jinja2" - self."Markdown" - self."PyYAML" - self."click" - self."ghp-import" - self."importlib-metadata" - self."mergedeep" - self."packaging" - self."pyyaml-env-tag" - self."watchdog" - ]; - }; - "mkdocs-autorefs" = super.buildPythonPackage rec { - pname = "mkdocs-autorefs"; - version = "0.4.1"; - src = fetchurl { - url = "https://files.pythonhosted.org/packages/fb/5c/6594400290df38f99bf8d9ef249387b56f4ad962667836266f6fe7da8597/mkdocs_autorefs-0.4.1-py3-none-any.whl"; - sha256 = "0nrz66fzimj5y5hdfcyfyr2ij4pz8x7rzh54ig6c17dj06aql952"; - }; - format = "wheel"; - doCheck = false; - buildInputs = []; - checkInputs = []; - nativeBuildInputs = []; - propagatedBuildInputs = [ - self."Markdown" - self."mkdocs" - ]; - }; - "mkdocs-material" = super.buildPythonPackage rec { - pname = "mkdocs-material"; - version = "8.3.6"; - src = fetchurl { - url = "https://files.pythonhosted.org/packages/cb/bf/501a3aa2e67f9d35dfd6c1882dc62c53b6bb4dc2110f7d49c1df45d40b92/mkdocs_material-8.3.6-py2.py3-none-any.whl"; - sha256 = "1ra38i9idykx53v20dnlz2hcdq4wdgl3idb4bavv6lap0nmzpwq1"; - }; - format = "wheel"; - doCheck = false; - buildInputs = []; - checkInputs = []; - nativeBuildInputs = []; - propagatedBuildInputs = [ - self."Jinja2" - self."Markdown" - self."mkdocs" - self."mkdocs-material-extensions" - self."pygments" - self."pymdown-extensions" - ]; - }; - "mkdocs-material-extensions" = super.buildPythonPackage rec { - pname = "mkdocs-material-extensions"; - version = "1.0.3"; - src = fetchurl { - url = "https://files.pythonhosted.org/packages/cc/f5/cc42642eb7bb4f8df06c058ea9a7e45f3be141851845ee77ff8eeb16e86b/mkdocs_material_extensions-1.0.3-py3-none-any.whl"; - sha256 = "0i1sk3ay7xmcnh23gy81z5hwy0g23cpbrclyblm0n1nf6gjp0ax8"; - }; - format = "wheel"; - doCheck = false; - buildInputs = []; - checkInputs = []; - nativeBuildInputs = []; - propagatedBuildInputs = []; - }; - "mkdocstrings" = super.buildPythonPackage rec { - pname = "mkdocstrings"; - version = "0.19.0"; - src = fetchurl { - url = "https://files.pythonhosted.org/packages/60/53/eedad37654a74f969d297e0dec67db17e7e013266cc6e3ea61c7568a01c8/mkdocstrings-0.19.0-py3-none-any.whl"; - sha256 = "0zbwr03c0m5zhr6m0jpabxxy0s3ycyr719l5jgv63jc5sc8da5rj"; - }; - format = "wheel"; - doCheck = false; - buildInputs = []; - checkInputs = []; - nativeBuildInputs = []; - propagatedBuildInputs = [ - self."Jinja2" - self."Markdown" - self."MarkupSafe" - self."mkdocs" - self."mkdocs-autorefs" - #self."mkdocstrings-python-legacy" - self."pymdown-extensions" - ]; - }; - "mkdocstrings-python-legacy" = super.buildPythonPackage rec { - pname = "mkdocstrings-python-legacy"; - version = "0.2.3"; - src = fetchurl { - url = "https://files.pythonhosted.org/packages/4e/82/24628a430d36ca0047d5582e2ce54644b52a1af618ef6db67ffcd413c6a5/mkdocstrings_python_legacy-0.2.3-py3-none-any.whl"; - sha256 = "000sfnwvrpw0whfx3zbvgqn7b2l6i6myp3a4m67bpc3480ddf10v"; - }; - format = "wheel"; - doCheck = false; - buildInputs = []; - checkInputs = []; - nativeBuildInputs = []; - propagatedBuildInputs = [ - self."mkdocstrings" - self."pytkdocs" - ]; - }; - "netaddr" = super.buildPythonPackage rec { - pname = "netaddr"; - version = "0.8.0"; - src = fetchurl { - url = "https://files.pythonhosted.org/packages/ff/cd/9cdfea8fc45c56680b798db6a55fa60a22e2d3d3ccf54fc729d083b50ce4/netaddr-0.8.0-py2.py3-none-any.whl"; - sha256 = "1b4hz5wazwj5ip4j3z2jrrbp8v7xb1gp73azbrp6blij5hix0rln"; - }; - format = "wheel"; - doCheck = false; - buildInputs = []; - checkInputs = []; - nativeBuildInputs = []; - propagatedBuildInputs = []; - }; - "oauthlib" = super.buildPythonPackage rec { - pname = "oauthlib"; - version = "3.2.0"; - src = fetchurl { - url = "https://files.pythonhosted.org/packages/1d/46/5ee2475e1b46a26ca0fa10d3c1d479577fde6ee289f8c6aa6d7ec33e31fd/oauthlib-3.2.0-py3-none-any.whl"; - sha256 = "1zi2614wn1kc5y00w1jlhdsr63sxpzzd9nx6yfvzk1s76m039cvd"; - }; - format = "wheel"; - doCheck = false; - buildInputs = []; - checkInputs = []; - nativeBuildInputs = []; - propagatedBuildInputs = []; - }; - "prometheus-client" = super.buildPythonPackage rec { - pname = "prometheus-client"; - version = "0.14.1"; - src = fetchurl { - url = "https://files.pythonhosted.org/packages/19/e5/7d4b4b3b0d8d2fdc55395cdb4271c6dbfde3c3ff7d6a6dbe63d19c4e2288/prometheus_client-0.14.1-py3-none-any.whl"; - sha256 = "00fwahfrq64a7wz471jax2lba56z88plawr7ksl24a184pbdwbsj"; - }; - format = "wheel"; - doCheck = false; - buildInputs = []; - checkInputs = []; - nativeBuildInputs = []; - propagatedBuildInputs = []; - }; - "promise" = super.buildPythonPackage rec { - pname = "promise"; - version = "2.3"; - src = fetchurl { - url = "https://files.pythonhosted.org/packages/cf/9c/fb5d48abfe5d791cd496e4242ebcf87a4bb2e0c3dcd6e0ae68c11426a528/promise-2.3.tar.gz"; - sha256 = "1l4kknj97dj5pxfpsz3ln78x9a843561c740b1m4pfi3qlvq7lfz"; - }; - format = "setuptools"; - doCheck = false; - buildInputs = []; - checkInputs = []; - nativeBuildInputs = []; - propagatedBuildInputs = [ - self."six" - ]; - }; - "psycopg2-binary" = super.buildPythonPackage rec { - pname = "psycopg2-binary"; - version = "2.9.3"; - src = fetchurl { - url = "https://files.pythonhosted.org/packages/d7/1c/8d042630c5ff3c3e6d93c992bd7ecf516d577803b96781c6caa649bbf6e5/psycopg2-binary-2.9.3.tar.gz"; - sha256 = "0kpaxg3lg5wg5ww5kxmzi2z2d7arsx13ci915d8a2pf17lqza7bn"; - }; - format = "setuptools"; - doCheck = false; - buildInputs = []; - checkInputs = []; - nativeBuildInputs = []; - propagatedBuildInputs = []; - }; - "pymdown-extensions" = super.buildPythonPackage rec { - pname = "pymdown-extensions"; - version = "9.5"; - src = fetchurl { - url = "https://files.pythonhosted.org/packages/f1/e0/1ed09f66cd1648f8e009120debf9b7d67596fb688e53e71522da1daa02a0/pymdown_extensions-9.5-py3-none-any.whl"; - sha256 = "1i31h061jkyidqc2ih3n75si66ld6hb08wf8y14m6xc3947iq57c"; - }; - format = "wheel"; - doCheck = false; - buildInputs = []; - checkInputs = []; - nativeBuildInputs = []; - propagatedBuildInputs = [ - self."Markdown" - ]; - }; - "pyrsistent" = super.buildPythonPackage rec { - pname = "pyrsistent"; - version = "0.18.1"; - src = fetchurl { - url = "https://files.pythonhosted.org/packages/42/ac/455fdc7294acc4d4154b904e80d964cc9aae75b087bbf486be04df9f2abd/pyrsistent-0.18.1.tar.gz"; - sha256 = "15pb8ry525h9z1670kzqi5915y004yjsrwsdf6x5awisk65izmnl"; - }; - format = "setuptools"; - doCheck = false; - buildInputs = []; - checkInputs = []; - nativeBuildInputs = []; - propagatedBuildInputs = []; - }; - "python-dateutil" = super.buildPythonPackage rec { - pname = "python-dateutil"; - version = "2.8.2"; - src = fetchurl { - url = "https://files.pythonhosted.org/packages/36/7a/87837f39d0296e723bb9b62bbb257d0355c7f6128853c78955f57342a56d/python_dateutil-2.8.2-py2.py3-none-any.whl"; - sha256 = "1aaxjfp4lrz8c6qls3vdhw554lan3khy9afyvdcvrssk6kf067cn"; - }; - format = "wheel"; - doCheck = false; - buildInputs = []; - checkInputs = []; - nativeBuildInputs = []; - propagatedBuildInputs = [ - self."six" - ]; - }; - "python3-openid" = super.buildPythonPackage rec { - pname = "python3-openid"; - version = "3.2.0"; - src = fetchurl { - url = "https://files.pythonhosted.org/packages/e0/a5/c6ba13860bdf5525f1ab01e01cc667578d6f1efc8a1dba355700fb04c29b/python3_openid-3.2.0-py3-none-any.whl"; - sha256 = "0szsdmrzixh51p69zcm51j12w8g7cbvsyk8b3rq8cx21w1qzf9k6"; - }; - format = "wheel"; - doCheck = false; - buildInputs = []; - checkInputs = []; - nativeBuildInputs = []; - propagatedBuildInputs = [ - self."defusedxml" - ]; - }; - "pytkdocs" = super.buildPythonPackage rec { - pname = "pytkdocs"; - version = "0.16.1"; - src = fetchurl { - url = "https://files.pythonhosted.org/packages/8d/8b/e0414df63cfab77785f72b86f0b35af65b8a861cdd3193bd535141ffedc2/pytkdocs-0.16.1-py3-none-any.whl"; - sha256 = "0yf3m98dhpdahh6gaa7jpcp87ky4x40r33jrrij2ifghrrpg9hx8"; - }; - format = "wheel"; - doCheck = false; - buildInputs = []; - checkInputs = []; - nativeBuildInputs = []; - propagatedBuildInputs = []; - }; - "pytz" = super.buildPythonPackage rec { - pname = "pytz"; - version = "2022.1"; - src = fetchurl { - url = "https://files.pythonhosted.org/packages/60/2e/dec1cc18c51b8df33c7c4d0a321b084cf38e1733b98f9d15018880fb4970/pytz-2022.1-py2.py3-none-any.whl"; - sha256 = "0p3amik3hqpyi9y1x22a552n490614xikcqyi1madncnaac8b2g6"; - }; - format = "wheel"; - doCheck = false; - buildInputs = []; - checkInputs = []; - nativeBuildInputs = []; - propagatedBuildInputs = []; - }; - "pyyaml-env-tag" = super.buildPythonPackage rec { - pname = "pyyaml-env-tag"; - version = "0.1"; - src = fetchurl { - url = "https://files.pythonhosted.org/packages/5a/66/bbb1dd374f5c870f59c5bb1db0e18cbe7fa739415a24cbd95b2d1f5ae0c4/pyyaml_env_tag-0.1-py3-none-any.whl"; - sha256 = "0s905i9h10l637dwrax7iav3ky6b65h8ih870b36hkcaxini0cdg"; - }; - format = "wheel"; - doCheck = false; - buildInputs = []; - checkInputs = []; - nativeBuildInputs = []; - propagatedBuildInputs = [ - self."PyYAML" - ]; - }; - "redis" = super.buildPythonPackage rec { - pname = "redis"; - version = "4.3.3"; - src = fetchurl { - url = "https://files.pythonhosted.org/packages/39/a6/022ed2fb6d4526c60e7b7e8830e6d5797cd2711719aa4392f99eda787706/redis-4.3.3-py3-none-any.whl"; - sha256 = "1rr26rkvrqpixlkkr5c97p0ydzkv8qhnp6s95zwyra1qsbsqszzm"; - }; - format = "wheel"; - doCheck = false; - buildInputs = []; - checkInputs = []; - nativeBuildInputs = []; - propagatedBuildInputs = [ - self."async-timeout" - self."deprecated" - self."packaging" - ]; - }; - #"requests" = super.buildPythonPackage rec { - # pname = "requests"; - # version = "2.28.0"; - # src = fetchurl { - # url = "https://files.pythonhosted.org/packages/41/5b/2209eba8133fc081d3ffff02e1f6376e3117e52bb16f674721a83e67e68e/requests-2.28.0-py3-none-any.whl"; - # sha256 = "0vrbrsprsjd6vl76slzk8k47iy8bml1avlq3ggqk1rmwgw9n2y5w"; - # }; - # format = "wheel"; - # doCheck = false; - # buildInputs = []; - # checkInputs = []; - # nativeBuildInputs = []; - # propagatedBuildInputs = [ - # self."certifi" - # self."charset-normalizer" - # self."idna" - # self."urllib3" - # ]; - #}; - "requests-oauthlib" = super.buildPythonPackage rec { - pname = "requests-oauthlib"; - version = "1.3.1"; - src = fetchurl { - url = "https://files.pythonhosted.org/packages/6f/bb/5deac77a9af870143c684ab46a7934038a53eb4aa975bc0687ed6ca2c610/requests_oauthlib-1.3.1-py2.py3-none-any.whl"; - sha256 = "1dfspmj87kr7nc1d22aqy7z0dhs7dq6hk7f00jihb3gvl80waxr5"; - }; - format = "wheel"; - doCheck = false; - buildInputs = []; - checkInputs = []; - nativeBuildInputs = []; - propagatedBuildInputs = [ - self."oauthlib" - self."requests" - ]; - }; - "rq" = super.buildPythonPackage rec { - pname = "rq"; - version = "1.10.1"; - src = fetchurl { - url = "https://files.pythonhosted.org/packages/46/ff/4386cbd87b64664ba5279158024fe2e2bc40be8cab2a685e79a3dcca380d/rq-1.10.1-py2.py3-none-any.whl"; - sha256 = "0fkyl3i6w4mycbr28hw6z9154zibwq7prrs1nnbick1nn8wczx4j"; - }; - format = "wheel"; - doCheck = false; - buildInputs = []; - checkInputs = []; - nativeBuildInputs = []; - propagatedBuildInputs = [ - self."click" - self."redis" - ]; - }; - "ruamel.yaml" = super.buildPythonPackage rec { - pname = "ruamel.yaml"; - version = "0.17.21"; - src = fetchurl { - url = "https://files.pythonhosted.org/packages/9e/cb/938214ac358fbef7058343b3765c79a1b7ed0c366f7f992ce7ff38335652/ruamel.yaml-0.17.21-py3-none-any.whl"; - sha256 = "19qwnvwc219sx4j2jknvbzvmvkj88b9b65kdpn0kj0k5sv9kaavl"; - }; - format = "wheel"; - doCheck = false; - buildInputs = []; - checkInputs = []; - nativeBuildInputs = []; - propagatedBuildInputs = [ - self."ruamel.yaml.clib" - ]; - }; - "ruamel.yaml.clib" = super.buildPythonPackage rec { - pname = "ruamel.yaml.clib"; - version = "0.2.6"; - src = fetchurl { - url = "https://files.pythonhosted.org/packages/8b/25/08e5ad2431a028d0723ca5540b3af6a32f58f25e83c6dda4d0fcef7288a3/ruamel.yaml.clib-0.2.6.tar.gz"; - sha256 = "1gdchmdngbni9mv6f62xb7ii1kjr8wvkqq859xwj1fws8g709xjg"; - }; - format = "setuptools"; - doCheck = false; - buildInputs = []; - checkInputs = []; - nativeBuildInputs = []; - propagatedBuildInputs = []; - }; - "rx" = super.buildPythonPackage rec { - pname = "rx"; - version = "1.6.1"; - src = fetchurl { - url = "https://files.pythonhosted.org/packages/33/0f/5ef4ac78e2a538cc1b054eb86285fe0bf7a5dbaeaac2c584757c300515e2/Rx-1.6.1-py2.py3-none-any.whl"; - sha256 = "01a1p3dgm9ikh6y1ymdb04rra17p4qrvf4r01igak0g8qwmmjmvk"; - }; - format = "wheel"; - doCheck = false; - buildInputs = []; - checkInputs = []; - nativeBuildInputs = []; - propagatedBuildInputs = []; - }; - "sentry-sdk" = super.buildPythonPackage rec { - pname = "sentry-sdk"; - version = "1.5.12"; - src = fetchurl { - url = "https://files.pythonhosted.org/packages/81/4e/1af0ec7a24e49ee405221a597887c3156e8071310015370621cc62152994/sentry_sdk-1.5.12-py2.py3-none-any.whl"; - sha256 = "1q8b6qsb6dfcdj8cgckcd1g9fvd8icqqcy1v7pj1wfy8lvq572vp"; - }; - format = "wheel"; - doCheck = false; - buildInputs = []; - checkInputs = []; - nativeBuildInputs = []; - propagatedBuildInputs = [ - self."certifi" - self."urllib3" - ]; - }; - "singledispatch" = super.buildPythonPackage rec { - pname = "singledispatch"; - version = "3.7.0"; - src = fetchurl { - url = "https://files.pythonhosted.org/packages/3f/09/2a17c6505a8373229cb3de6161e3af74ff90afcf4516719aa6cf32fad151/singledispatch-3.7.0-py2.py3-none-any.whl"; - sha256 = "12d9kb0krk6ppmi44nm6qbnqcayxgcdhzhjgdmnmj8lagjlsyxxw"; - }; - format = "wheel"; - doCheck = false; - buildInputs = []; - checkInputs = []; - nativeBuildInputs = []; - propagatedBuildInputs = [ - self."six" - ]; - }; - #"six" = super.buildPythonPackage rec { - # pname = "six"; - # version = "1.16.0"; - # src = fetchurl { - # url = "https://files.pythonhosted.org/packages/d9/5a/e7c31adbe875f2abbb91bd84cf2dc52d792b5a01506781dbcf25c91daf11/six-1.16.0-py2.py3-none-any.whl"; - # sha256 = "0m02dsi8lvrjf4bi20ab6lm7rr6krz7pg6lzk3xjs2l9hqfjzfwa"; - # }; - # format = "wheel"; - # doCheck = false; - # buildInputs = []; - # checkInputs = []; - # nativeBuildInputs = []; - # propagatedBuildInputs = []; - #}; - "social-auth-app-django" = super.buildPythonPackage rec { - pname = "social-auth-app-django"; - version = "5.0.0"; - src = fetchurl { - url = "https://files.pythonhosted.org/packages/08/00/fe5049b9fdcb8cd829eba30b068a311590722a91a576304b267e084aaeca/social_auth_app_django-5.0.0-py3-none-any.whl"; - sha256 = "0p869f172wwwqf98mm6hiif2sln53zrgzfh8q6qhl0as8hjil92j"; - }; - format = "wheel"; - doCheck = false; - buildInputs = []; - checkInputs = []; - nativeBuildInputs = []; - propagatedBuildInputs = [ - self."social-auth-core" - ]; - }; - "social-auth-core" = super.buildPythonPackage rec { - pname = "social-auth-core"; - version = "4.3.0"; - src = fetchurl { - url = "https://files.pythonhosted.org/packages/60/f9/5387e450842d785f4e100e3766bf0d2a8aa44acad619459cf7abff72a9c5/social_auth_core-4.3.0-py3-none-any.whl"; - sha256 = "1pwp2z958w5lcarpwbsbyamnah2vp96rv315zqnv0hzp0k8l0d0y"; - }; - format = "wheel"; - doCheck = false; - buildInputs = []; - checkInputs = []; - nativeBuildInputs = []; - propagatedBuildInputs = [ - self."PyJWT" - self."cryptography" - self."defusedxml" - self."oauthlib" - self."python3-openid" - self."requests" - self."requests-oauthlib" - ]; - }; - "sqlparse" = super.buildPythonPackage rec { - pname = "sqlparse"; - version = "0.4.2"; - src = fetchurl { - url = "https://files.pythonhosted.org/packages/05/40/d836d55fb3f467243ee839ab7b814822fda522cd395fa41e282684e71ee5/sqlparse-0.4.2-py3-none-any.whl"; - sha256 = "0kd6lh692wd02sk102f0i4vvjmrp4a1qn7mvpn8jkd5qdcsrwwa8"; - }; - format = "wheel"; - doCheck = false; - buildInputs = []; - checkInputs = []; - nativeBuildInputs = []; - propagatedBuildInputs = []; - }; - "svgwrite" = super.buildPythonPackage rec { - pname = "svgwrite"; - version = "1.4.2"; - src = fetchurl { - url = "https://files.pythonhosted.org/packages/cb/f3/5e44c3c6f36387afca7db6b6afbd47ea1e040ba362a6b9508d23123cc35f/svgwrite-1.4.2-py3-none-any.whl"; - sha256 = "0hqxsxkj0qx09mzjp6nfxs6xxhg134aczn5jlacz1xnijrixfqya"; - }; - format = "wheel"; - doCheck = false; - buildInputs = []; - checkInputs = []; - nativeBuildInputs = []; - propagatedBuildInputs = []; - }; - "swagger-spec-validator" = super.buildPythonPackage rec { - pname = "swagger-spec-validator"; - version = "2.7.4"; - src = fetchurl { - url = "https://files.pythonhosted.org/packages/71/81/ffaceaa8da1a40f8c807382ffa705b15d293cac551b662586d4dea7ebeed/swagger_spec_validator-2.7.4-py2.py3-none-any.whl"; - sha256 = "0mcq03x0nn1zwqdsp1br0nw2g0qpq32q8zg1zmbp4bi6nm6kldsf"; - }; - format = "wheel"; - doCheck = false; - buildInputs = []; - checkInputs = []; - nativeBuildInputs = []; - propagatedBuildInputs = [ - self."PyYAML" - self."jsonschema" - self."six" - ]; - }; - "tablib" = super.buildPythonPackage rec { - pname = "tablib"; - version = "3.2.1"; - src = fetchurl { - url = "https://files.pythonhosted.org/packages/41/62/9771bc91ee9e9faa8f00caefd51f77d348cc72f910a96fdd5e2a4cc28ac3/tablib-3.2.1-py3-none-any.whl"; - sha256 = "1701s5sl141c1d84szg7i31zn154pgl5b81p96hk31bkixl7w3c7"; - }; - format = "wheel"; - doCheck = false; - buildInputs = []; - checkInputs = []; - nativeBuildInputs = []; - propagatedBuildInputs = []; - }; - "text-unidecode" = super.buildPythonPackage rec { - pname = "text-unidecode"; - version = "1.3"; - src = fetchurl { - url = "https://files.pythonhosted.org/packages/a6/a5/c0b6468d3824fe3fde30dbb5e1f687b291608f9473681bbf7dabbf5a87d7/text_unidecode-1.3-py2.py3-none-any.whl"; - sha256 = "1s12m0s73djhjcc1i2w8hx94ak2glqmiqwr32qj3anc9ic7g248k"; - }; - format = "wheel"; - doCheck = false; - buildInputs = []; - checkInputs = []; - nativeBuildInputs = []; - propagatedBuildInputs = []; - }; - "tzdata" = super.buildPythonPackage rec { - pname = "tzdata"; - version = "2022.1"; - src = fetchurl { - url = "https://files.pythonhosted.org/packages/89/2d/49329ebec33b14dae61ecc8c85abe596341832fa36c4bcd3d99fddda018b/tzdata-2022.1-py2.py3-none-any.whl"; - sha256 = "1f9a1ri0gi4qh6mqdr9vmgnp4f71wnqgm878nkbqw4ql88ip13i3"; - }; - format = "wheel"; - doCheck = false; - buildInputs = []; - checkInputs = []; - nativeBuildInputs = []; - propagatedBuildInputs = []; - }; - "uritemplate" = super.buildPythonPackage rec { - pname = "uritemplate"; - version = "4.1.1"; - src = fetchurl { - url = "https://files.pythonhosted.org/packages/81/c0/7461b49cd25aeece13766f02ee576d1db528f1c37ce69aee300e075b485b/uritemplate-4.1.1-py2.py3-none-any.whl"; - sha256 = "0bp08jq51nrjha3sgfc4dwk3d2cflfa5kl7alhp33pcvv6w0h343"; - }; - format = "wheel"; - doCheck = false; - buildInputs = []; - checkInputs = []; - nativeBuildInputs = []; - propagatedBuildInputs = []; - }; - #"urllib3" = super.buildPythonPackage rec { - # pname = "urllib3"; - # version = "1.26.9"; - # src = fetchurl { - # url = "https://files.pythonhosted.org/packages/ec/03/062e6444ce4baf1eac17a6a0ebfe36bb1ad05e1df0e20b110de59c278498/urllib3-1.26.9-py2.py3-none-any.whl"; - # sha256 = "051c8x2xchkhcrvagwzw4p4jx6j6ym4cdlcvgik6yw5i7zay9v24"; - # }; - # format = "wheel"; - # doCheck = false; - # buildInputs = []; - # checkInputs = []; - # nativeBuildInputs = []; - # propagatedBuildInputs = []; - #}; - "watchdog" = super.buildPythonPackage rec { - pname = "watchdog"; - version = "2.1.9"; - src = fetchurl { - url = "https://files.pythonhosted.org/packages/42/f7/da8e889f8626786eac9454e8d2718fc79359ed517be20cdd50c647167d39/watchdog-2.1.9.tar.gz"; - sha256 = "028nwawkdvb91nah3mnc4wjjnicj8qfnvxvnlcgz4lbangmj1kj3"; - }; - format = "setuptools"; - doCheck = false; - buildInputs = []; - checkInputs = []; - nativeBuildInputs = []; - propagatedBuildInputs = []; - }; - "webencodings" = super.buildPythonPackage rec { - pname = "webencodings"; - version = "0.5.1"; - src = fetchurl { - url = "https://files.pythonhosted.org/packages/f4/24/2a3e3df732393fed8b3ebf2ec078f05546de641fe1b667ee316ec1dcf3b7/webencodings-0.5.1-py2.py3-none-any.whl"; - sha256 = "0y2aa53jkkcszhbbx59z817ywjvy3ah3lavym6bn88n2yc9i5bx0"; - }; - format = "wheel"; - doCheck = false; - buildInputs = []; - checkInputs = []; - nativeBuildInputs = []; - propagatedBuildInputs = []; - }; - "wrapt" = super.buildPythonPackage rec { - pname = "wrapt"; - version = "1.14.1"; - src = fetchurl { - url = "https://files.pythonhosted.org/packages/11/eb/e06e77394d6cf09977d92bff310cb0392930c08a338f99af6066a5a98f92/wrapt-1.14.1.tar.gz"; - sha256 = "0kgdvwz0xb17d2503521yccz8kq0bxv9zsp2zdy9prp0i77qa2iq"; - }; - format = "setuptools"; - doCheck = false; - buildInputs = []; - checkInputs = []; - nativeBuildInputs = []; - propagatedBuildInputs = []; - }; - "zipp" = super.buildPythonPackage rec { - pname = "zipp"; - version = "3.8.0"; - src = fetchurl { - url = "https://files.pythonhosted.org/packages/80/0e/16a7ee38617aab6a624e95948d314097cc2669edae9b02ded53309941cfc/zipp-3.8.0-py3-none-any.whl"; - sha256 = "16ghbifm4cl9s5jdamw92zjhlazl1x4b1ibwisizfx4fyjxybxn4"; - }; - format = "wheel"; - doCheck = false; - buildInputs = []; - checkInputs = []; - nativeBuildInputs = []; - propagatedBuildInputs = []; - }; -} diff --git a/ops/nixos/bvm-netbox/default.nix b/ops/nixos/bvm-netbox/default.nix index 76e1a8ed53..a4c7eda531 100644 --- a/ops/nixos/bvm-netbox/default.nix +++ b/ops/nixos/bvm-netbox/default.nix @@ -6,126 +6,101 @@ let inherit (depot.ops) secrets; - netbox = depot.nix.pkgs.netbox.override { - configuration = '' - ALLOWED_HOSTS = ["netbox.int.lukegb.com"] - DATABASE = { - 'ENGINE': 'django.db.backends.postgresql', - 'NAME': 'netbox', - } + netboxConfiguration = '' + SECRET_KEY = '${secrets.netbox.secretKey}' - REDIS = { - 'tasks': { - 'HOST': 'localhost', - 'PORT': 6379, - 'DATABASE': 0, - 'SSL': False, - }, - 'caching': { - 'HOST': 'localhost', - 'PORT': 6379, - 'DATABASE': 1, - 'SSL': False, - }, - } + ADMINS = [] + ALLOWED_URL_SCHEMES = ( + 'file', 'ftp', 'ftps', 'http', 'https', 'irc', 'mailto', 'sftp', 'ssh', 'tel', 'telnet', 'tftp', 'vnc', 'xmpp', + ) - SECRET_KEY = '${secrets.netbox.secretKey}' + BANNER_TOP = "" + BANNER_BOTTOM = "" + BANNER_LOGIN = "" + BASE_PATH = "" - ADMINS = [] - ALLOWED_URL_SCHEMES = ( - 'file', 'ftp', 'ftps', 'http', 'https', 'irc', 'mailto', 'sftp', 'ssh', 'tel', 'telnet', 'tftp', 'vnc', 'xmpp', - ) + CHANGELOG_RETENTION = 0 - BANNER_TOP = "" - BANNER_BOTTOM = "" - BANNER_LOGIN = "" - BASE_PATH = "" + CORS_ORIGIN_ALLOW_ALL = False + CORS_ORIGIN_WHITELIST = [] + CORS_ORIGIN_REGEX_WHITELIST = [] - CHANGELOG_RETENTION = 0 + CUSTOM_VALIDATORS = {} - CORS_ORIGIN_ALLOW_ALL = False - CORS_ORIGIN_WHITELIST = [] - CORS_ORIGIN_REGEX_WHITELIST = [] + DEBUG = False - CUSTOM_VALIDATORS = {} + EMAIL = {} - DEBUG = False + ENFORCE_GLOBAL_UNIQUE = True - EMAIL = {} + EXEMPT_VIEW_PERMISSIONS = [] - ENFORCE_GLOBAL_UNIQUE = True + GRAPHQL_ENABLED = False - EXEMPT_VIEW_PERMISSIONS = [] + INTERNAL_IPS = ('127.0.0.1', '::1') - GRAPHQL_ENABLED = False + LOGIN_REQUIRED = True + LOGIN_TIMEOUT = None - INTERNAL_IPS = ('127.0.0.1', '::1') + MAINTENANCE_MODE = False - LOGGING = {} + MAPS_URL = 'https://maps.google.com/?q=' - LOGIN_REQUIRED = True - LOGIN_TIMEOUT = None + MAX_PAGE_SIZE = 1000 - MAINTENANCE_MODE = False + MEDIA_ROOT = '/srv/netbox/media' - MAPS_URL = 'https://maps.google.com/?q=' + STORAGE_BACKEND = 'storages.backends.s3boto3.S3Boto3Storage' + STORAGE_CONFIG = { + 'AWS_ACCESS_KEY_ID': "${secrets.netbox.s3.accessKey}", + 'AWS_SECRET_ACCESS_KEY': "${secrets.netbox.s3.secretAccessKey}", + 'AWS_STORAGE_BUCKET_NAME': 'netbox', + 'AWS_S3_ENDPOINT_URL': 'https://objdump.zxcvbnm.ninja', + 'AWS_S3_REGION_NAME': 'london', + } - MAX_PAGE_SIZE = 1000 + METRICS_ENABLED = False - MEDIA_ROOT = '/srv/netbox/media' + NAPALM_USERNAME = "" + NAPALM_PASSWORD = "" + NAPALM_TIMEOUT = 30 + NAPALM_ARGS = {} - STORAGE_BACKEND = 'storages.backends.s3boto3.S3Boto3Storage' - STORAGE_CONFIG = { - 'AWS_ACCESS_KEY_ID': "${secrets.netbox.s3.accessKey}", - 'AWS_SECRET_ACCESS_KEY': "${secrets.netbox.s3.secretAccessKey}", - 'AWS_STORAGE_BUCKET_NAME': 'netbox', - 'AWS_S3_ENDPOINT_URL': 'https://objdump.zxcvbnm.ninja', - 'AWS_S3_REGION_NAME': 'london', - } + PAGINATE_COUNT = 50 - METRICS_ENABLED = False + PLUGINS = [] - NAPALM_USERNAME = "" - NAPALM_PASSWORD = "" - NAPALM_TIMEOUT = 30 - NAPALM_ARGS = {} + PREFER_IPV4 = False - PAGINATE_COUNT = 50 + RACK_ELEVATION_DEFAULT_UNIT_HEIGHT = 22 + RACK_ELEVATION_DEFAULT_UNIT_WIDTH = 220 - PLUGINS = [] + REMOTE_AUTH_ENABLED = False + REMOTE_AUTH_BACKEND = 'netbox.authentication.RemoteUserBackend' + REMOTE_AUTH_HEADER = 'HTTP_REMOTE_USER' + REMOTE_AUTH_AUTO_CREATE_USER = True + REMOTE_AUTH_DEFAULT_GROUPS = [] + REMOTE_AUTH_DEFAULT_PERMISSIONS = {} - PREFER_IPV4 = False + RELEASE_CHECK_URL = None - RACK_ELEVATION_DEFAULT_UNIT_HEIGHT = 22 - RACK_ELEVATION_DEFAULT_UNIT_WIDTH = 220 + REPORTS_ROOT = '/srv/netbox/reports' - REMOTE_AUTH_ENABLED = False - REMOTE_AUTH_BACKEND = 'netbox.authentication.RemoteUserBackend' - REMOTE_AUTH_HEADER = 'HTTP_REMOTE_USER' - REMOTE_AUTH_AUTO_CREATE_USER = True - REMOTE_AUTH_DEFAULT_GROUPS = [] - REMOTE_AUTH_DEFAULT_PERMISSIONS = {} + RQ_DEFAULT_TIMEOUT = 300 - RELEASE_CHECK_URL = None + SCRIPTS_ROOT = '/srv/netbox/scripts' - REPORTS_ROOT = '/srv/netbox/reports' + SESSION_COOKIE_NAME = 'netboxsess' - RQ_DEFAULT_TIMEOUT = 300 + TIME_ZONE = 'UTC' - SCRIPTS_ROOT = '/srv/netbox/scripts' - - SESSION_COOKIE_NAME = 'netboxsess' - - TIME_ZONE = 'UTC' - - DATE_FORMAT = 'Y-m-d' - SHORT_DATE_FORMAT = 'Y-m-d' - TIME_FORMAT = 'g:i a' - SHORT_TIME_FORMAT = 'H:i:s' - DATETIME_FORMAT = 'Y-m-d g:i a' - SHORT_DATETIME_FORMAT = 'Y-m-d H:i' - ''; - }; + DATE_FORMAT = 'Y-m-d' + SHORT_DATE_FORMAT = 'Y-m-d' + TIME_FORMAT = 'g:i a' + SHORT_TIME_FORMAT = 'H:i:s' + DATETIME_FORMAT = 'Y-m-d g:i a' + SHORT_DATETIME_FORMAT = 'Y-m-d H:i' + ''; in { imports = [ ../lib/bvm.nix @@ -150,62 +125,51 @@ in { my.ip.tailscale = "100.81.27.52"; my.ip.tailscale6 = "fd7a:115c:a1e0:ab12:4843:cd96:6251:1b34"; - services.postgresql = { - enable = true; - ensureDatabases = [ - "netbox" - ]; - ensureUsers = [{ - name = "netbox"; - ensurePermissions = { "DATABASE netbox" = "ALL PRIVILEGES"; }; - }]; - }; services.postgresqlBackup.enable = true; - services.redis.servers."" = { + my.vault.secrets.netbox-secret-key = { + restartUnits = ["netbox.service"]; + group = "root"; + template = '' + {{ with secret "kv/apps/netbox" }} + {{ .Data.data.secret-key }} + {{ end }} + ''; + }; + my.vault.secrets.netbox-s3-access-key = { + restartUnits = ["netbox.service"]; + group = "root"; + template = '' + {{ with secret "kv/apps/netbox" }} + {{ .Data.data.s3-access-key }} + {{ end }} + ''; + }; + my.vault.secrets.netbox-s3-secret-access-key = { + restartUnits = ["netbox.service"]; + group = "root"; + template = '' + {{ with secret "kv/apps/netbox" }} + {{ .Data.data.s3-secret-access-key }} + {{ end }} + ''; + }; + + services.netbox = { enable = true; - }; - - users.groups.netbox = {}; - users.users.netbox = { - home = "/srv/netbox"; - isSystemUser = true; - createHome = true; - group = "netbox"; - }; - - environment.systemPackages = with pkgs; [ - netbox - ]; - - systemd.services.netbox-rq = { - wantedBy = [ "multi-user.target" ]; - after = [ "network-online.target" ]; - serviceConfig = { - Type = "simple"; - User = "netbox"; - Group = "netbox"; - WorkingDirectory = "/srv/netbox"; - ExecStart = "${netbox}/bin/netbox-manage rqworker high default low"; - Restart = "on-failure"; - RestartSec = 30; - PrivateTmp = true; - }; - }; - - systemd.services.netbox = { - wantedBy = [ "multi-user.target" ]; - after = [ "network-online.target" ]; - serviceConfig = { - Type = "simple"; - User = "netbox"; - Group = "netbox"; - WorkingDirectory = "/srv/netbox"; - PIDFile = "/srv/netbox/gunicorn.pid"; - ExecStart = "${netbox}/bin/netbox-gunicorn --pid /srv/netbox/gunicorn.pid --config ${netbox}/share/netbox/contrib/gunicorn.py netbox.wsgi"; - Restart = "on-failure"; - RestartSec = 30; - PrivateTmp = true; + dataDir = "/srv/netbox"; + extraConfig = lib.mkAfter (netboxConfiguration + '' + with open("${config.my.vault.secrets.netbox-s3-access-key.path}", "r") as f: + STORAGE_CONFIG['AWS_ACCESS_KEY_ID'] = f.readline() + with open("${config.my.vault.secrets.netbox-s3-secret-access-key.path}", "r") as f: + STORAGE_CONFIG['AWS_SECRET_ACCESS_KEY'] = f.readline() + ''); + listenAddress = "127.0.0.1"; + port = 8001; + package = pkgs.netbox_3_6; + secretKeyFile = config.my.vault.secrets.netbox-secret-key.path; + settings = { + ALLOWED_HOSTS = ["netbox.int.lukegb.com"]; }; }; @@ -214,7 +178,7 @@ in { recommendedProxySettings = true; virtualHosts."netbox.int.lukegb.com" = { locations."/static/" = { - alias = "${netbox}/share/netbox/netbox/static/"; + alias = "/srv/netbox/static"; }; locations."/" = { proxyPass = "http://127.0.0.1:8001"; diff --git a/ops/vault/cfg/config.nix b/ops/vault/cfg/config.nix index 829720d5a1..21489837b6 100644 --- a/ops/vault/cfg/config.nix +++ b/ops/vault/cfg/config.nix @@ -71,6 +71,7 @@ my.apps.ads-b = {}; my.apps.nixbuild = {}; my.apps.tumblrandom = {}; + my.apps.netbox = {}; my.servers.etheroute-lon01.apps = [ "pomerium" ]; my.servers.howl.apps = [ "nixbuild" ]; @@ -85,4 +86,5 @@ my.servers.bvm-heptapod.apps = [ "gitlab-runner" ]; my.servers.bvm-nixosmgmt.apps = [ "plex-pass" ]; my.servers.blade-tuvok.apps = [ "fup" ]; + my.servers.bvm-netbox.apps = [ "netbox" ]; }