From f9280452fb47877da8150d48ac918a5895f53c46 Mon Sep 17 00:00:00 2001 From: h7x4 Date: Tue, 8 Nov 2022 14:28:59 +0100 Subject: [PATCH] nginx: fix failing hosts - nani.wtf has changed flake structure - jupyter need websockets --- flake.lock | 60 ++++++++++---------------- hosts/tsuki/services/nginx/default.nix | 6 ++- 2 files changed, 27 insertions(+), 39 deletions(-) diff --git a/flake.lock b/flake.lock index 44623a8..208abea 100644 --- a/flake.lock +++ b/flake.lock @@ -16,26 +16,11 @@ "type": "github" } }, - "flake-utils": { - "locked": { - "lastModified": 1644229661, - "narHash": "sha256-1YdnJAsNy69bpcjuoKdOYQX0YxZBiCYZo4Twxerqv7k=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "3cecb5b042f7f209c56ffd8371b2711a290ec797", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, "fonts": { "flake": false, "locked": { - "lastModified": 1651945262, - "narHash": "sha256-7r0hq5G/HjK6yVOt18VKaxuJcGM6GPu/jmwbkksJ7LE=", + "lastModified": 1649003599, + "narHash": "sha256-QtT+ansp3ombpdS2+jNWgZKSqpxhVq3cyrpAKkDzA9Y=", "path": "/home/h7x4/git/fonts", "type": "path" }, @@ -51,11 +36,11 @@ ] }, "locked": { - "lastModified": 1656169755, - "narHash": "sha256-Nlnm4jeQWEGjYrE6hxi/7HYHjBSZ/E0RtjCYifnNsWk=", + "lastModified": 1667907331, + "narHash": "sha256-bHkAwkYlBjkupPUFcQjimNS8gxWSWjOTevEuwdnp5m0=", "owner": "nix-community", "repo": "home-manager", - "rev": "4a3d01fb53f52ac83194081272795aa4612c2381", + "rev": "6639e3a837fc5deb6f99554072789724997bc8e5", "type": "github" }, "original": { @@ -67,11 +52,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1660749083, - "narHash": "sha256-GHLFMGH+r3OmI4tV0x/RtxN7DkHcH2ZOhK8uzQeSLiY=", + "lastModified": 1667821506, + "narHash": "sha256-u4HKBBfTOPpFsGnM7sjS0+F67Hmf2or3uHKNVxXZtiM=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "a55a7db823959cf509d55325201f1864af4574b9", + "rev": "ebf65554b18ee053311f43e5faa5a3f36626c52e", "type": "github" }, "original": { @@ -99,11 +84,11 @@ ] }, "locked": { - "lastModified": 1660913098, - "narHash": "sha256-mm27EyD2mxpPjI6KaznqB62VL7/QRkN31VcipTIxso0=", + "lastModified": 1667668549, + "narHash": "sha256-MRLHIEtZuf1rdUP+Jn/vmRBAzNyEyGxO4RBhsycLHx0=", "ref": "refs/heads/main", - "rev": "ff49c477262f5e2f499e13b32cdef3aa6920f9e7", - "revCount": 32, + "rev": "e2429487551c8456d34108647d9869e644c7fa00", + "revCount": 42, "type": "git", "url": "file:///home/h7x4/git/nix-secrets" }, @@ -114,11 +99,11 @@ }, "unstable-nixpkgs": { "locked": { - "lastModified": 1660819943, - "narHash": "sha256-TRZV/mlW1eYuojqDC3ueYWj7jsTKXJCtyMLNYX/Ybtw=", + "lastModified": 1667811565, + "narHash": "sha256-HYml7RdQPQ7X13VNe2CoDMqmifsXbt4ACTKxHRKQE3Q=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "8ea014acc33da95ea56c902229957d8225005163", + "rev": "667e5581d16745bcda791300ae7e2d73f49fff25", "type": "github" }, "original": { @@ -130,11 +115,11 @@ "vscode-server": { "flake": false, "locked": { - "lastModified": 1658079296, - "narHash": "sha256-xnUCsRKi06dJpKFxNCeMsmzkyek4teGGzjYYR+vYI7c=", + "lastModified": 1662442857, + "narHash": "sha256-e2ex4mO4q6UBoJvPSRdYBX1vIvpulqs6SNxvdSsL6uE=", "owner": "msteen", "repo": "nixos-vscode-server", - "rev": "867d5691871acc039fb47d45018c69e9ac751d95", + "rev": "c54b714db58ad05d064f394d6603751ee6bd04f6", "type": "github" }, "original": { @@ -145,17 +130,16 @@ }, "website": { "inputs": { - "flake-utils": "flake-utils", "nixpkgs": [ "nixpkgs" ] }, "locked": { - "lastModified": 1648430064, - "narHash": "sha256-kPRmFqlTWPrlyaVkOm/dWbui2EDzaCmwjwBRv3nciSw=", + "lastModified": 1667672395, + "narHash": "sha256-YM6GmD6jJejuAV9/t8p8++IbEXs6ooy0SvSDmNpSZ58=", "ref": "main", - "rev": "9fc1893ad33ae78c30f81b6438bf1bd5097a1ae3", - "revCount": 61, + "rev": "669ded6d45c2932dcacbe97b385ca01d093229af", + "revCount": 73, "type": "git", "url": "https://git.nani.wtf/h7x4/nani.wtf" }, diff --git a/hosts/tsuki/services/nginx/default.nix b/hosts/tsuki/services/nginx/default.nix index 5e510e0..1052310 100644 --- a/hosts/tsuki/services/nginx/default.nix +++ b/hosts/tsuki/services/nginx/default.nix @@ -67,6 +67,7 @@ name = "nani.wtf"; value = { locations = { + "= /".return = "301 https://www.nani.wtf/"; "/.well-known/".alias = "${./well-known}/"; "/.well-known/openpgpkey/hu/" = { alias = "${./well-known/openpgpkey/hu}/"; @@ -90,7 +91,7 @@ }; } (proxy ["plex"] "http://localhost:${s ports.plex}" {}) - (host ["www"] { root = "${inputs.website.defaultPackage.${pkgs.system}}/"; }) + (host ["www"] { root = "${inputs.website.packages.${pkgs.system}.default}/"; }) (proxy ["matrix"] "http://localhost:${s ports.matrix.listener}" {}) (host ["madmin"] { root = "${pkgs.synapse-admin}/"; }) (host ["cache"] { root = "/var/lib/nix-cache"; }) @@ -107,6 +108,9 @@ locations."/".proxyWebsockets = true; }) (proxy ["pg"] "http://localhost:${s ports.pgadmin}" {}) + (proxy ["py"] "http://localhost:${s ports.jupyterhub}" { + locations."/".proxyWebsockets = true; + }) # (host ["vpn"] "" {}) (proxy ["hydra"] "http://localhost:${s ports.hydra}" {}) (proxy ["air"] "https://${ips.kansei}:${s ports.kansei}" {})