modules/website.nix init

idea is to have a directory `websites/` which contains all our static
sites, with the name of each subdirectory also being their domain. Then
Nix can just read that directory during build-time and automatically
generate nginx virtualHosts for all of them (note that the
subdirectories have to contain a `default.nix` specifying how to build
the site for that to work).

Thus we could avoid the dependency on gitlab pages.
keep-around/ae67b38304b0e6dff2be6fc582d2e918ef381786
stuebinm 2022-01-06 23:04:44 +01:00
parent c08ca5f85f
commit eb07f34672
27 changed files with 4042 additions and 0 deletions

View File

@ -5,6 +5,7 @@ in {
imports = [
./nftnat
./decklink.nix
./websites.nix
"${sources.nixpkgs-unstable}/nixos/modules/services/security/vaultwarden"
];

53
modules/websites.nix Normal file
View File

@ -0,0 +1,53 @@
{ config, lib, pkgs, ... }:
with lib;
let
cfg = config.hacc.websites;
in
{
options.hacc.websites = {
enable = mkOption {
type = types.bool;
default = false;
};
directory = mkOption {
type = types.path;
description = "all subdirectories of the given path are expected to contain a (static) website";
};
ignore = mkOption {
type = types.listOf types.str;
default = [];
description = "subdirectories that shouldn't be published";
};
};
config = mkIf cfg.enable {
services.nginx = {
enable = true;
virtualHosts =
let
subdirs =
let dirAttrs = filterAttrs
(n: v: v == "directory" || lists.elem n cfg.ignore)
(builtins.readDir cfg.directory);
in mapAttrsToList (n: v: n) dirAttrs;
mkWebsite = subdir: {
name = subdir;
# the nginx virtualhost config (for all sites) goes in here
value = {
enableACME = true;
forceSSL = true;
# naive string interpolation is safe here since nix will always immediately
# resolve relative paths to absolute paths; it's not lazy about that.
locations."/".root =
(pkgs.callPackage "${cfg.directory}/${subdir}" {}).outPath;
};
};
in listToAttrs (map mkWebsite subdirs);
};
};
}

View File

@ -4,6 +4,10 @@ with lib;
let
domains = [ "www.infra4future.de" "hacc.earth" "www.hacc.earth" "muc.hacc.earth" "help.studentsforfuture.info" ];
in {
hacc.websites = {
enable = true;
directory = ../websites;
};
services.nginx.virtualHosts =
listToAttrs (map (host: nameValuePair host {

View File

@ -0,0 +1,2 @@
_site/*
.jekyll-cache/*

View File

@ -0,0 +1,12 @@
# Site settings
title: Mumble
description: Mumble ist eine wundervolle Sprachendingens die viel besser ist als Discord
baseurl: "" # the subpath of your site, e.g. /blog
url: "https://mumble.hacc.space" # the base hostname & protocol for your site e.g. http://willianjusten.com.br
exclude:
- vendor
- default.nix
sass:
textcolor: white

View File

@ -0,0 +1 @@
<a name="{{ include.name}}" href=""></a>

View File

@ -0,0 +1,7 @@
<div style="text-align:center;">
<div class="border-test">
<div> „{{ include.quote }}“ <br> — {{ include.author }}</div>
</div>
</div>

View File

@ -0,0 +1,11 @@
<div class="faq">
<details>
<summary>{{ include.question }}</summary>
<div markdown="span">
{{ include.answer }}
</div>
</details>
</div>

View File

@ -0,0 +1,7 @@
<footer>
<p>
<a href="https://infra4future.de/impressum.html">Impressum</a>
<a href="mailto:info@infra4future.de">Kontakt</a>
</p>
</footer>

View File

@ -0,0 +1,11 @@
<head>
<title>{{ page.title }}</title>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="format-detection" content="telephone=no">
<meta name="description" content="{% if page.description %}{{ page.description | strip_html | strip_newlines | truncate: 160 }}{% else %}{{ site.description }}{% endif %}">
<link rel="stylesheet" href="{{ "assets/css/main.css" | prepend: site.baseurl }}">
</head>

View File

@ -0,0 +1,32 @@
<div class="dropdown">
<button class="dropbtn">
<div></div>
<div></div>
<div></div>
</button>
<div class="dropdown-content">
<a class="link" href="#about" data-scroll>About</a>
<a class="link" href="#styling" data-scroll>Styling</a>
</div>
</div>
<div class="header">
<span class="site-title">{{ page.title }}</span>
<div class="header-links">
<a class="link" href="#about" data-scroll>About</a>
<a class="link" href="#styling" data-scroll>Colours &amp; More</a>
</div>
</div>
<div class="background">
</div>
<div class="border-top">
<div class="site-banner">
{{ page.slogan }}
</div>
{% include contact-buttons.html %}
</div>

View File

@ -0,0 +1,6 @@
<div style="margin-bottom:8em;">
<a href="{{site.baseurl}}/"></a>
<div class="header">
<a class="site-title" href="{{site.baseurl}}/">{{ page.title }}</a>
</div>
</div>

View File

@ -0,0 +1,13 @@
<!DOCTYPE html>
<html lang="de">
{% include head.html %}
<body>
<section id="top-section">
{% include header.html %}
</section>
<section>
{{ content }}
</section>
{% include footer.html %}
</body>

View File

@ -0,0 +1,16 @@
<!DOCTYPE html>
<html lang="de">
{% include head.html %}
<body>
<body>
<section id="top-section">
{% include top-bar.html %}
</section>
<section>
{{ content }}
</section>
{% include footer.html %}
</body>

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,44 @@
Copyright (c) 2013, Quote-Unquote Apps (http://quoteunquoteapps.com),
with Reserved Font Name Courier Prime.
This Font Software is licensed under the SIL Open Font License, Version 1.1.
This license is copied below, and is also available with a FAQ at: http://scripts.sil.org/OFL
-----------------------------------------------------------
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
-----------------------------------------------------------
PREAMBLE
The goals of the Open Font License (OFL) are to stimulate worldwide development of collaborative font projects, to support the font creation efforts of academic and linguistic communities, and to provide a free and open framework in which fonts may be shared and improved in partnership with others.
The OFL allows the licensed fonts to be used, studied, modified and redistributed freely as long as they are not sold by themselves. The fonts, including any derivative works, can be bundled, embedded, redistributed and/or sold with any software provided that any reserved names are not used by derivative works. The fonts and derivatives, however, cannot be released under any other type of license. The requirement for fonts to remain under this license does not apply to any document created using the fonts or their derivatives.
DEFINITIONS
"Font Software" refers to the set of files released by the Copyright Holder(s) under this license and clearly marked as such. This may include source files, build scripts and documentation.
"Reserved Font Name" refers to any names specified as such after the copyright statement(s).
"Original Version" refers to the collection of Font Software components as distributed by the Copyright Holder(s).
"Modified Version" refers to any derivative made by adding to, deleting, or substituting -- in part or in whole -- any of the components of the Original Version, by changing formats or by porting the Font Software to a new environment.
"Author" refers to any designer, engineer, programmer, technical writer or other person who contributed to the Font Software.
PERMISSION & CONDITIONS
Permission is hereby granted, free of charge, to any person obtaining a copy of the Font Software, to use, study, copy, merge, embed, modify, redistribute, and sell modified and unmodified copies of the Font Software, subject to the following conditions:
1) Neither the Font Software nor any of its individual components, in Original or Modified Versions, may be sold by itself.
2) Original or Modified Versions of the Font Software may be bundled, redistributed and/or sold with any software, provided that each copy contains the above copyright notice and this license. These can be included either as stand-alone text files, human-readable headers or in the appropriate machine-readable metadata fields within text or binary files as long as those fields can be easily viewed by the user.
3) No Modified Version of the Font Software may use the Reserved Font Name(s) unless explicit written permission is granted by the corresponding Copyright Holder. This restriction only applies to the primary font name as presented to the users.
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font Software shall not be used to promote, endorse or advertise any Modified Version, except to acknowledge the contribution(s) of the Copyright Holder(s) and the Author(s) or with their explicit written permission.
5) The Font Software, modified or unmodified, in part or in whole, must be distributed entirely under this license, and must not be distributed under any other license. The requirement for fonts to remain under this license does not apply to any document created using the Font Software.
TERMINATION
This license becomes null and void if any of the above conditions are not met.
DISCLAIMER
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM OTHER DEALINGS IN THE FONT SOFTWARE.

View File

@ -0,0 +1,150 @@
SplineFontDB: 3.0
FontName: Untitled1
FullName: Untitled1
FamilyName: Untitled1
Weight: Regular
Copyright: Copyright (c) 2020, Matthias Stübinger,,,
UComments: "2020-1-5: Created with FontForge (http://fontforge.org)"
Version: 001.000
ItalicAngle: 0
UnderlinePosition: -100
UnderlineWidth: 50
Ascent: 800
Descent: 200
InvalidEm: 0
LayerCount: 2
Layer: 0 0 "Back" 1
Layer: 1 0 "Zeichen" 0
XUID: [1021 772 -648170974 5500403]
StyleMap: 0x0000
FSType: 0
OS2Version: 0
OS2_WeightWidthSlopeOnly: 0
OS2_UseTypoMetrics: 1
CreationTime: 1578263233
ModificationTime: 1578265302
OS2TypoAscent: 0
OS2TypoAOffset: 1
OS2TypoDescent: 0
OS2TypoDOffset: 1
OS2TypoLinegap: 90
OS2WinAscent: 0
OS2WinAOffset: 1
OS2WinDescent: 0
OS2WinDOffset: 1
HheadAscent: 0
HheadAOffset: 1
HheadDescent: 0
HheadDOffset: 1
DEI: 91125
Encoding: ISO8859-1
UnicodeInterp: none
NameList: AGL For New Fonts
DisplaySize: -48
AntiAlias: 1
FitToEm: 0
WinInfo: 23 23 11
BeginChars: 256 2
StartChar: A
Encoding: 65 65 0
Width: 1000
VWidth: 0
HStem: 27.2012 83.5371<374.738 656.705>
VStem: 819.425 101.188<627.095 688.447>
LayerCount: 2
Fore
SplineSet
320.7265625 26.6806640625 m 4
153.284179688 65.95703125 92.08203125 190.265625 92.64453125 489.938476562 c 4
93.04296875 702.162109375 129.069335938 773.688476562 258.708007812 819.634765625 c 4
324.93359375 843.106445312 691.46875 842.830078125 758.083984375 819.2578125 c 4
888.3671875 773.157226562 929.6328125 688.447265625 920.612304688 485.623046875 c 4
913.676757812 329.662109375 899.232421875 298.811523438 809.731445312 248.793945312 c 4
734.809570312 206.924804688 566.55859375 187.069335938 435.303710938 204.608398438 c 4
379.083984375 212.12109375 330.973632812 216.155273438 328.392578125 213.57421875 c 4
325.810546875 210.9921875 331.533203125 192.541992188 341.108398438 172.572265625 c 4
369.044921875 114.307617188 408.703125 101.32421875 543.529296875 106.302734375 c 6
663.625 110.73828125 l 5
663.625 76.4892578125 l 6
663.625 47.978515625 655.21484375 39.7197265625 613.431640625 27.201171875 c 4
555.108398438 9.7275390625 394.22265625 9.44140625 320.7265625 26.6806640625 c 4
377.80078125 323.666015625 m 4
420.1328125 345.03515625 474.008789062 379.002929688 497.525390625 399.150390625 c 4
521.04296875 419.297851562 567.15625 445.780273438 600 458 c 4
704.46875 496.8671875 819.424804688 620.29296875 819.424804688 693.590820312 c 4
819.424804688 721.377929688 766.41015625 739.228515625 683.88671875 739.228515625 c 4
601.830078125 739.228515625 527.57421875 715.0078125 452.50390625 663.755859375 c 4
422.233398438 643.08984375 368.254882812 616.512695312 332.55078125 604.694335938 c 4
249.05078125 577.057617188 128.31640625 507.891601562 137.53515625 492.975585938 c 4
141.451171875 486.639648438 179.400390625 494.111328125 221.868164062 509.578125 c 4
277.490234375 529.8359375 303.030273438 533.750976562 313.202148438 523.578125 c 4
323.375 513.40625 305.36328125 495.467773438 248.791015625 459.426757812 c 4
130.141601562 383.838867188 150.375976562 360.106445312 279.485351562 423.427734375 c 4
338.770507812 452.50390625 353.653320312 455.423828125 370.65625 441.3125 c 4
408.69140625 409.747070312 389.399414062 379.208984375 286.572265625 308.213867188 c 4
231.23828125 270.009765625 291.842773438 280.274414062 377.80078125 323.666015625 c 4
EndSplineSet
Validated: 524321
EndChar
StartChar: B
Encoding: 66 66 1
Width: 1000
VWidth: 0
HStem: 34 68.0889<129.726 244 721.215 835.489> 583.406 47.207<336.202 433.13 541.763 643.551> 835.351 68.0889<129.726 244 721.215 835.489>
VStem: 42.1152 201.885<34 102.089 835.351 903.439> 42.1152 87.6104<102.089 835.351> 237.23 81.4883<279.013 563.804 592.909 622.337> 446.074 81.9756<279.013 563.804> 655.893 81.9766<279.013 565.067> 721.215 201.885<34 102.089 835.351 903.439> 835.489 87.6104<102.089 835.351>
LayerCount: 2
Fore
SplineSet
42.115234375 903.439453125 m 5xf2
244 903.439453125 l 5
244 835.350585938 l 5xf2
129.725585938 835.350585938 l 5
129.725585938 102.088867188 l 5xea
244 102.088867188 l 5
244 34 l 5
42.115234375 34 l 5
42.115234375 903.439453125 l 5xf2
513.899414062 587.391601562 m 5
524.958984375 602.10546875 538.947265625 612.936523438 555.86328125 619.884765625 c 4
573.104492188 627.037109375 593.760742188 630.61328125 617.833007812 630.61328125 c 4
661.748046875 630.61328125 692.65234375 619.884765625 710.543945312 598.426757812 c 4
728.760742188 577.173828125 737.489257812 537.350585938 737.869140625 477.95703125 c 6
737.869140625 279.012695312 l 5
655.892578125 279.012695312 l 5
655.892578125 475.504882812 l 6
655.892578125 523.9375 651.500976562 553.978515625 642.71875 565.626953125 c 4
634.260742188 577.479492188 618.645507812 583.40625 595.875 583.40625 c 4
569.850585938 583.40625 551.958984375 577.071289062 542.200195312 564.401367188 c 4
532.766601562 551.935546875 528.049804688 522.302734375 528.049804688 475.504882812 c 6
528.049804688 279.012695312 l 5
446.07421875 279.012695312 l 5
446.07421875 475.504882812 l 6
446.07421875 524.55078125 441.357421875 554.795898438 431.922851562 566.240234375 c 4
422.814453125 577.684570312 406.224609375 583.40625 382.15234375 583.40625 c 4
358.405273438 583.40625 341.814453125 577.071289062 332.380859375 564.401367188 c 4
323.272460938 551.935546875 318.71875 522.302734375 318.71875 475.504882812 c 6
318.71875 279.012695312 l 5
237.23046875 279.012695312 l 5
237.23046875 622.336914062 l 5
318.71875 622.336914062 l 5
318.71875 592.909179688 l 6xe7
329.453125 605.170898438 342.790039062 614.469726562 358.73046875 620.8046875 c 4
374.995117188 627.34375 393.375 630.61328125 413.869140625 630.61328125 c 4
438.591796875 630.61328125 459.0859375 627.037109375 475.350585938 619.884765625 c 4
491.94140625 612.731445312 504.791015625 601.900390625 513.899414062 587.391601562 c 5
923.099609375 903.439453125 m 5xe280
923.099609375 34 l 5
721.21484375 34 l 5
721.21484375 102.088867188 l 5xe280
835.489257812 102.088867188 l 5
835.489257812 835.350585938 l 5xe240
721.21484375 835.350585938 l 5
721.21484375 903.439453125 l 5
923.099609375 903.439453125 l 5xe280
EndSplineSet
Validated: 524289
EndChar
EndChars
EndSplineFont

View File

@ -0,0 +1,14 @@
{ jekyll, stdenvNoCC }:
stdenvNoCC.mkDerivation {
name = "mumble.infra4future.de-static";
src = ./.;
phases = [ "buildPhase" ];
buildPhase = ''
cd $src
${jekyll}/bin/jekyll build -d $out --disable-disk-cache
'';
}

View File

@ -0,0 +1,38 @@
---
layout: simple_page
title: mumble.hacc.space
slogan: Telefonkonferenzen for Future!
---
# Was?
`mumble.hacc.space` ist ein Server für Telefonkonferenzen, betrieben von [hacc](https://hacc.earth). Wenn ihr einen Ort sucht, an dem ihr euch trotz (selbst)-Quarantäne für z.B. ein Plenum treffen könnt, seid ihr gerne willkommen.
# How To
Diesen Server könnt ihr (noch) nicht direkt über euren Browser benutzen. Stattdessen nutzen wir [mumble](https://mumble.info), eine freie Software für Telefonkonferenzen, deren Client ihr (falls nicht schon getan) erst noch auf eurem Rechner installieren müsst:
- [Downloadlinks](https://www.mumble.info/downloads/) von der offiziellen Seite für
- [Windows 64bit](https://www.mumble.info/downloads/windows-64)
- [Windows 32bit](https://www.mumble.info/downloads/windows-32)
- [Mac OS](https://www.mumble.info/downloads/osx)
- [iOS (App Store)](https://apps.apple.com/de/app/mumble/id443472808)
- Für Linux: meistens ist mumble bereits in den Paketquellen eurer Distro enthalten, schaut also einfach dort nach (oder [kompiliert den Client selbst](https://github.com/mumble-voip/mumble/releases/))
- Zusätzlich gibt es noch Third-Party-Clients:
- für Android in [Google Play](https://play.google.com/store/apps/details?id=com.morlunk.mumbleclient.free) und [fdroid](https://f-droid.org/repository/browse/?fdid=com.morlunk.mumbleclient)
- für iOS einen alternativen Client auch aus dem [App Store](https://itunes.apple.com/de/app/mumblefy/id858752232)
Einmal heruntergeladen, folgt den Anweisungen des Einrichtungsassistenten; gebt am Ende als Server `mumble.hacc.space` an, und benutzt am besten ein Headset oder zumindest Kopfhörer (sonst kann es zu Rückkopplungen oder "Echos" kommen). Fertig!
# Noch Fragen?
Schaut am Besten zuerst in das [Wiki](https://wiki.mumble.info/wiki/Main_Page) auf mumble.info, insbesondere in die sehr ausführliche [FAQ-Seite](https://wiki.mumble.info/wiki/FAQ/Deutsch) dort.