Add contact page

This commit is contained in:
Simon Bruder 2021-06-02 13:19:15 +02:00
parent ce57c9a62c
commit 80f33f9095
Signed by: simon
GPG key ID: 8D3C82F9F309F8EC
7 changed files with 158 additions and 0 deletions

View file

@ -52,6 +52,13 @@
enableACME = true; enableACME = true;
forceSSL = true; forceSSL = true;
}; };
virtualHosts."sbruder.de" = {
enableACME = true;
forceSSL = true;
root = pkgs.sbruder.contact;
};
}; };
networking.firewall.allowedTCPPorts = [ 80 443 ]; networking.firewall.allowedTCPPorts = [ 80 443 ];
systemd.services.nginx.serviceConfig.SupplementaryGroups = lib.singleton "keys"; systemd.services.nginx.serviceConfig.SupplementaryGroups = lib.singleton "keys";

View file

@ -0,0 +1,17 @@
{ lib, stdenvNoCC }:
stdenvNoCC.mkDerivation {
name = "sbruder-contact";
src = ./src;
dontBuild = true;
installPhase = ''
mkdir $out
cp * $out
'';
meta = with lib; {
license = licenses.mit;
};
}

View file

@ -0,0 +1,45 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>Simon Bruder: Contact</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<div class="container">
<h1 id="name">Simon Bruder</h1>
<table>
<tr>
<td>Email</td>
<td><a id="email" href="#">(requires javascript)</a></td>
</tr>
<tr>
<td>Matrix</td>
<td><a id="matrix" href="#">(requires javascript)</a></td>
</tr>
<tr>
<td>GitHub</td>
<td><a href="https://github.com/sbruder">sbruder</a></td>
</tr>
<tr>
<td>GitLab</td>
<td><a href="https://gitlab.com/sbruder">sbruder</a></td>
</tr>
<tr>
<td>Gitea</td>
<td><a href="https://git.sbruder.de/simon">git.sbruder.de</a></td>
</tr>
<tr>
<td>PGP</td>
<td><a href="pubkey.asc">47E7 559E 037A 3565 2DBB F8AA 8D3C 82F9 F309 F8EC</a></td>
</tr>
<tr>
<td>SSH</td>
<td><a href="https://git.sbruder.de/simon.keys">public keys (dynamic)</a></td>
</tr>
</table>
</div>
<script src="main.js"></script>
</body>
</html>

View file

@ -0,0 +1,18 @@
(() => {
const givenName = document.getElementById('name').innerText.split(" ")[0].toLowerCase()
const domain = location.host
if (domain !== "sbruder.de") {
return
}
const mailAddress = givenName + '@' + domain
const mailEl = document.getElementById('email')
mailEl.innerText = mailAddress
mailEl.href = `mailto:${mailAddress}`
const matrixAddress = '@' + givenName + ':' + domain
const matrixEl = document.getElementById('matrix')
matrixEl.innerText = matrixAddress
matrixEl.href = `https://matrix.to/#/${matrixAddress}`
})()

View file

@ -0,0 +1,52 @@
-----BEGIN PGP PUBLIC KEY BLOCK-----
mQINBF/lCz0BEADKOij3IA1IIiZc9c8rgxTUtrn4W1R8ncgsnFuXIDGD35dBB9e0
wd5noQigoqts9N8ULHEV6J8AuBdl1IP2nAKAr6h3F+hrLjL5tZZCPpTN5fhxWguz
wt6aFZgcFwFmQfZHSInxO2XpcibyJAs5ZXW3cO+VYQdVxXLT6KOLKkqWCCGMlQSt
xNigzNbrjUcjrcGBcjNbFJs0P4BkVvD6+3xBerpT6zwAuFdBiUpZZk+XI1QCAuVF
6ld5A+x+pwvKoN/n040UAUAdLTne7oisNonLhSvZVrH2uH4dKkku/yi2glSkUwps
n+ffr0jD9VrdbxktcqQBE0WU2q7Eqe6EjSxURHI6uJ/wFh0QeYR8sT5mgPMt5O9T
T49Kz2uUdljuHW0eI37DJSUDcXWh0OtuENRFf7m0lvIIaaPpbPM4btS8j9lCFs9h
pJsQIQbNjV+UmIBvddDKGwcL+DHJFk0E2sqPYOwsebvbQLhVvPSPWWUVKrqMay9Y
Vd9KKy/KddESzM6c3TFmUbkEj1h4qWSZ0XX0vGL8LL68maaDHwO1nKuw/XfSpjAC
c+3wuqAgwFB+ihO/qWs8CB0z+wo+7NK9OUUVVucu2duUUjNknf6+v6fPedtziapp
SHVQQKWYvozxVa7XU+dnrU3ZUHzIrv6Fr6yTdGy6fw7pE3yPFIwbw9vsowARAQAB
tB9TaW1vbiBCcnVkZXIgPHNpbW9uQHNicnVkZXIuZGU+iQJ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8f6yKpQ4ZKg9cH7
ovqpDS9R6CDrACDPNJSTBn2VyOdjGVc4FrhGsXp3FAe5prt1b9psvYTTuXrZZJZP
dI1cLPI0Knyymf56gVMGCjp+x1+w7ef0ylGLPtFEuy/6iqWR3H5htZDQo3AgOVgd
R7VFGCA=
=7eg7
-----END PGP PUBLIC KEY BLOCK-----

View file

@ -0,0 +1,18 @@
body {
font-family: "PT Sans", "Helvetica", "Helvetica Neue", "Roboto", "Arimo", "Arial", sans-serif;
}
.container {
max-width: 500px;
margin: 0 auto 50px;
}
tr td:first-child::after {
content: ":";
}
a {
text-decoration: none;
color: inherit;
font-weight: 600;
}

View file

@ -11,6 +11,7 @@ in
wordclock-dimmer = prev.python3Packages.callPackage ./wordclock-dimmer { }; wordclock-dimmer = prev.python3Packages.callPackage ./wordclock-dimmer { };
sbruder = prev.recurseIntoAttrs { sbruder = prev.recurseIntoAttrs {
contact = callPackage ./contact-page { };
imprint = callPackage ./imprint { }; imprint = callPackage ./imprint { };
}; };