Compare commits
1 Commits
bluemap-us
...
errorpages
| Author | SHA1 | Date | |
|---|---|---|---|
| 914458d4b0 |
38
flake.lock
generated
38
flake.lock
generated
@@ -102,6 +102,21 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"minecraft-data": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1725277886,
|
||||||
|
"narHash": "sha256-Fw4VbbE3EfypQWSgPDFfvVH47BHeg3ptsO715NlUM8Q=",
|
||||||
|
"ref": "refs/heads/master",
|
||||||
|
"rev": "1b4087bd3322a2e2ba84271c8fcc013e6b641a58",
|
||||||
|
"revCount": 2,
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://git.pvv.ntnu.no/Projects/minecraft-kartverket.git"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://git.pvv.ntnu.no/Projects/minecraft-kartverket.git"
|
||||||
|
}
|
||||||
|
},
|
||||||
"minecraft-heatmap": {
|
"minecraft-heatmap": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
@@ -122,27 +137,6 @@
|
|||||||
"url": "https://git.pvv.ntnu.no/Projects/minecraft-heatmap.git"
|
"url": "https://git.pvv.ntnu.no/Projects/minecraft-heatmap.git"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"minecraft-kartverket": {
|
|
||||||
"inputs": {
|
|
||||||
"nixpkgs": [
|
|
||||||
"nixpkgs"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1762856548,
|
|
||||||
"narHash": "sha256-HA7z6QH4vLUWSj1Ff7lIfdbBUPrC56Qq4gWBClfxuqc=",
|
|
||||||
"ref": "rewrite-in-python",
|
|
||||||
"rev": "85b20b636d0afb64fa60323ee2406f1ae059d6c1",
|
|
||||||
"revCount": 13,
|
|
||||||
"type": "git",
|
|
||||||
"url": "https://git.pvv.ntnu.no/Projects/minecraft-kartverket.git"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"ref": "rewrite-in-python",
|
|
||||||
"type": "git",
|
|
||||||
"url": "https://git.pvv.ntnu.no/Projects/minecraft-kartverket.git"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"nix-gitea-themes": {
|
"nix-gitea-themes": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
@@ -236,8 +230,8 @@
|
|||||||
"greg-ng": "greg-ng",
|
"greg-ng": "greg-ng",
|
||||||
"grzegorz-clients": "grzegorz-clients",
|
"grzegorz-clients": "grzegorz-clients",
|
||||||
"matrix-next": "matrix-next",
|
"matrix-next": "matrix-next",
|
||||||
|
"minecraft-data": "minecraft-data",
|
||||||
"minecraft-heatmap": "minecraft-heatmap",
|
"minecraft-heatmap": "minecraft-heatmap",
|
||||||
"minecraft-kartverket": "minecraft-kartverket",
|
|
||||||
"nix-gitea-themes": "nix-gitea-themes",
|
"nix-gitea-themes": "nix-gitea-themes",
|
||||||
"nixpkgs": "nixpkgs",
|
"nixpkgs": "nixpkgs",
|
||||||
"nixpkgs-unstable": "nixpkgs-unstable",
|
"nixpkgs-unstable": "nixpkgs-unstable",
|
||||||
|
|||||||
@@ -33,8 +33,7 @@
|
|||||||
grzegorz-clients.url = "git+https://git.pvv.ntnu.no/Grzegorz/grzegorz-clients.git";
|
grzegorz-clients.url = "git+https://git.pvv.ntnu.no/Grzegorz/grzegorz-clients.git";
|
||||||
grzegorz-clients.inputs.nixpkgs.follows = "nixpkgs";
|
grzegorz-clients.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
|
||||||
minecraft-kartverket.url = "git+https://git.pvv.ntnu.no/Projects/minecraft-kartverket.git?ref=rewrite-in-python";
|
minecraft-data.url = "git+https://git.pvv.ntnu.no/Projects/minecraft-kartverket.git";
|
||||||
minecraft-kartverket.inputs.nixpkgs.follows = "nixpkgs";
|
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = { self, nixpkgs, nixpkgs-unstable, sops-nix, disko, ... }@inputs:
|
outputs = { self, nixpkgs, nixpkgs-unstable, sops-nix, disko, ... }@inputs:
|
||||||
|
|||||||
99
hosts/bekkalokk/services/500.html
Normal file
99
hosts/bekkalokk/services/500.html
Normal file
@@ -0,0 +1,99 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="no">
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<title>500 – Intern serverfeil | PVV</title>
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
|
<style>
|
||||||
|
body {
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
font-family: 'Open Sans', sans-serif;
|
||||||
|
background-color: #002244;
|
||||||
|
color: #f0f0f0;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
height: 100vh;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
.box {
|
||||||
|
max-width: 480px;
|
||||||
|
padding: 2rem;
|
||||||
|
}
|
||||||
|
.logo {
|
||||||
|
width: 30%;
|
||||||
|
height: auto;
|
||||||
|
margin: 0 auto 2rem;
|
||||||
|
}
|
||||||
|
h1 {
|
||||||
|
margin: 0 0 1rem;
|
||||||
|
font-size: 2.25rem;
|
||||||
|
font-weight: 700;
|
||||||
|
}
|
||||||
|
p {
|
||||||
|
margin: 0 0 1.25rem;
|
||||||
|
font-size: 1.05rem;
|
||||||
|
line-height: 1.4;
|
||||||
|
}
|
||||||
|
.error-code {
|
||||||
|
margin: 1.5rem 0;
|
||||||
|
opacity: 0.7;
|
||||||
|
}
|
||||||
|
.contact {
|
||||||
|
margin-top: 1.75rem;
|
||||||
|
font-size: 0.93rem;
|
||||||
|
line-height: 1.4;
|
||||||
|
}
|
||||||
|
.contact a {
|
||||||
|
color: #bcd025;
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
ul {
|
||||||
|
padding: 0;
|
||||||
|
list-style: none;
|
||||||
|
margin: 0.5rem 0 0;
|
||||||
|
}
|
||||||
|
li {
|
||||||
|
margin: 0.35rem 0;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div class="box">
|
||||||
|
<div class="logo">
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 200 200">
|
||||||
|
<path fill="#283681" d="M0 0h200v200H0z"/>
|
||||||
|
<g fill="none" fill-opacity="0" stroke="#fff" stroke-width="1.1">
|
||||||
|
<path d="M119.6 180H78.3"/>
|
||||||
|
<path d="M179.3 55.8v124.3h-55"/>
|
||||||
|
<path stroke-linecap="square" d="M124.6 180a2.5 2.5 0 0 0-2.5-2.5 2.5 2.5 0 0 0-2.6 2.6H78.6a2.5 2.5 0 0 0-2.5-2.6 2.5 2.5 0 0 0-2.6 2.6H19.2V19.9h160v30H175v6.2h4.3"/>
|
||||||
|
</g>
|
||||||
|
<circle cx="396.8" cy="400" r="320.3" fill="none" stroke="#fff" stroke-miterlimit="10" stroke-width="4.2" transform="scale(.25)"/>
|
||||||
|
<g fill="none" fill-opacity="0" stroke="#fff" stroke-width="1.1">
|
||||||
|
<path stroke-linejoin="bevel" d="M128.6 43.4h-86v113.3h113.2V53.8l-9.7-10.5h-6.8L137 45h-5.4"/>
|
||||||
|
<path d="M131.6 83c0 1.9-1.3 3.4-3 3.4H57c-1.6 0-3-1.6-3-3.5v-36c0-1.9 1.4-3.4 3-3.4h71.7c1.7 0 3 1.5 3 3.4z"/>
|
||||||
|
<path d="M131.7 83.4a3 3 0 0 1-3 3H74.2a3 3 0 0 1-3-3v-37a3 3 0 0 1 3-3h54.5a3 3 0 0 1 3 3zm12.8 70a3 3 0 0 1-3 3H56.9a3 3 0 0 1-3-3V95.3a3 3 0 0 1 3-3h84.6a3 3 0 0 1 3 3zM45 147.6h6.4v5.7H45zm101.9 0h6.4v5.7H147z"/>
|
||||||
|
<path d="M108.4 48.4h16.2v34.4h-16.2z"/>
|
||||||
|
</g>
|
||||||
|
<path fill="#fff" stroke="#fff" stroke-miterlimit="10" stroke-width="4.2" d="M275 541.6c0 3.5 2.7 6.4 6.2 6.4 3.6 0 6.5-2.9 6.5-6.4v-31h30.8c10.5 0 19.2-8.7 19.2-19.2v-22.7c0-10.3-8.7-19-19.2-19H275zm12.7-43.8v-35.4h30.8c3.3 0 6.5 3 6.5 6.3v22.7c0 3.6-3 6.5-6.5 6.5zm78.3-19 25.3 65.2a6.4 6.4 0 0 0 12 0l25.4-65.3V456c0-3.4-2.9-6.3-6.4-6.3a6.3 6.3 0 0 0-6.3 6.3v20.3l-18.6 47.6-18.7-47.6V456c0-3.4-2.9-6.3-6.4-6.3a6.3 6.3 0 0 0-6.3 6.3zm91 0 25.4 65.2a6.4 6.4 0 0 0 12 0l25.4-65.3V456c0-3.4-2.9-6.3-6.4-6.3a6.3 6.3 0 0 0-6.3 6.3v20.3l-18.7 47.6-18.6-47.6V456c0-3.4-3-6.3-6.5-6.3a6.3 6.3 0 0 0-6.3 6.3z" transform="scale(.25)"/>
|
||||||
|
</svg>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<h1>50X: Intern serverfeil</h1>
|
||||||
|
<p>Beklager, noe gikk galt.</p>
|
||||||
|
<p>Vennligst prøv igjen senere eller gå til forsiden.</p>
|
||||||
|
<div class="error-code">Feilkode: 50X</div>
|
||||||
|
|
||||||
|
<div class="contact">
|
||||||
|
<p>Kontakt drift hvis problemet vedvarer:</p>
|
||||||
|
<ul>
|
||||||
|
<li><strong>Discord:</strong> <a href="https://discord.gg/pyDDFpbG2x" target="_blank">discord.gg/pyDDFpbG2x</a></li>
|
||||||
|
<li><strong>Matrix:</strong> <a href="https://matrix.to/#/#pvv:pvv.ntnu.no" target="_blank">#pvv:pvv.ntnu.no</a></li>
|
||||||
|
<li><strong>E‑post:</strong> <a href="mailto:drift@pvv.ntnu.no">drift@pvv.ntnu.no</a></li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|
||||||
@@ -1,7 +1,6 @@
|
|||||||
{ config, lib, pkgs, inputs, ... }:
|
{ config, lib, pkgs, inputs, ... }:
|
||||||
let
|
let
|
||||||
vanillaSurvival = "/var/lib/bluemap/vanilla_survival_world";
|
vanillaSurvival = "/var/lib/bluemap/vanilla_survival_world";
|
||||||
format = pkgs.formats.hocon { };
|
|
||||||
in {
|
in {
|
||||||
imports = [
|
imports = [
|
||||||
./module.nix # From danio, pending upstreaming
|
./module.nix # From danio, pending upstreaming
|
||||||
@@ -21,18 +20,14 @@ in {
|
|||||||
|
|
||||||
host = "minecraft.pvv.ntnu.no";
|
host = "minecraft.pvv.ntnu.no";
|
||||||
|
|
||||||
maps = let
|
maps = {
|
||||||
inherit (inputs.minecraft-kartverket.packages.${pkgs.hostPlatform.system}) bluemap-export;
|
|
||||||
in {
|
|
||||||
"verden" = {
|
"verden" = {
|
||||||
settings = {
|
settings = {
|
||||||
world = vanillaSurvival;
|
world = vanillaSurvival;
|
||||||
sorting = 0;
|
sorting = 0;
|
||||||
ambient-light = 0.1;
|
ambient-light = 0.1;
|
||||||
cave-detection-ocean-floor = -5;
|
cave-detection-ocean-floor = -5;
|
||||||
marker-sets = {
|
marker-sets = inputs.minecraft-data.map-markers.vanillaSurvival.verden;
|
||||||
_includes = [ (format.lib.mkInclude "${bluemap-export}/overworld.hocon") ];
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
"underverden" = {
|
"underverden" = {
|
||||||
@@ -47,9 +42,7 @@ in {
|
|||||||
cave-detection-ocean-floor = -5;
|
cave-detection-ocean-floor = -5;
|
||||||
cave-detection-uses-block-light = true;
|
cave-detection-uses-block-light = true;
|
||||||
max-y = 90;
|
max-y = 90;
|
||||||
marker-sets = {
|
marker-sets = inputs.minecraft-data.map-markers.vanillaSurvival.underverden;
|
||||||
_includes = [ (format.lib.mkInclude "${bluemap-export}/nether.hocon") ];
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
"enden" = {
|
"enden" = {
|
||||||
@@ -62,9 +55,6 @@ in {
|
|||||||
world-sky-light = 0;
|
world-sky-light = 0;
|
||||||
remove-caves-below-y = -10000;
|
remove-caves-below-y = -10000;
|
||||||
cave-detection-ocean-floor = -5;
|
cave-detection-ocean-floor = -5;
|
||||||
marker-sets = {
|
|
||||||
_includes = [ (format.lib.mkInclude "${bluemap-export}/the-end.hocon") ];
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,4 +1,10 @@
|
|||||||
{ pkgs, config, ... }:
|
{ pkgs, config, ... }:
|
||||||
{
|
{
|
||||||
services.nginx.enable = true;
|
services.nginx = {
|
||||||
|
enable = true;
|
||||||
|
appendHttpConfig = ''
|
||||||
|
error_page 500 502 503 504 /500.html;
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
environment.etc."nginx/html/500.html".source = ./500.html;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -122,5 +122,17 @@ in {
|
|||||||
"/diverse/abuse.php".return = "301 https://wiki.pvv.ntnu.no/wiki/CERT/Abuse";
|
"/diverse/abuse.php".return = "301 https://wiki.pvv.ntnu.no/wiki/CERT/Abuse";
|
||||||
"/nerds/".return = "301 https://wiki.pvv.ntnu.no/wiki/Nerdepizza";
|
"/nerds/".return = "301 https://wiki.pvv.ntnu.no/wiki/Nerdepizza";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
extraConfig = ''
|
||||||
|
error_page 500 502 503 504 /500.html;
|
||||||
|
'';
|
||||||
|
locations."/500.html" = {
|
||||||
|
root = "/etc/static/nginx/html";
|
||||||
|
extraConfig = ''
|
||||||
|
internal;
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user