feat(fun/solves-this): add, deploy to public01
This builds the important website for both snix.systems and its predecessor, tvix.systems. Change-Id: I4cce5595098c804bd4df0cc2ae3c05344138e7b1 Reviewed-on: https://cl.snix.dev/c/snix/+/30502 Autosubmit: Florian Klink <flokli@flokli.de> Reviewed-by: Ryan Lahfa <ryan@lahfa.xyz> Tested-by: besadii
This commit is contained in:
parent
a11099fd1c
commit
e285cbe8cf
6 changed files with 75 additions and 0 deletions
13
fun/solves-this/default.nix
Normal file
13
fun/solves-this/default.nix
Normal file
|
|
@ -0,0 +1,13 @@
|
||||||
|
{ pkgs, ... }:
|
||||||
|
let
|
||||||
|
mkWebroot = title: imgsrc: pkgs.runCommand "webroot" { } ''
|
||||||
|
mkdir -p $out
|
||||||
|
title="${title}" substituteAll ${./index.html} $out/index.html
|
||||||
|
cp ${imgsrc} $out/solves-this.png
|
||||||
|
'';
|
||||||
|
|
||||||
|
in
|
||||||
|
{
|
||||||
|
tvix = mkWebroot "Tvix solves this" ./tvix_solves_this.png;
|
||||||
|
snix = mkWebroot "Snix solves this" ./snix_solves_this.png;
|
||||||
|
}
|
||||||
41
fun/solves-this/index.html
Normal file
41
fun/solves-this/index.html
Normal file
|
|
@ -0,0 +1,41 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<title>@title@</title>
|
||||||
|
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css">
|
||||||
|
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap-theme.min.css">
|
||||||
|
<script src="https://code.jquery.com/jquery-2.2.1.min.js"></script>
|
||||||
|
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>
|
||||||
|
<style>
|
||||||
|
html {
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
body {
|
||||||
|
background: #f8f8f8;
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
.container {
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
.solves-this {
|
||||||
|
max-width: 60%;
|
||||||
|
max-height: 50%;
|
||||||
|
}
|
||||||
|
.subtitle {
|
||||||
|
text-align: center;
|
||||||
|
font-weight: bold;
|
||||||
|
font-size: 6em;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
<div class="container">
|
||||||
|
<img src="solves-this.png" class="img-responsive solves-this" alt="The "Get Better Material" meme with "@title@"" />
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
BIN
fun/solves-this/snix_solves_this.png
Normal file
BIN
fun/solves-this/snix_solves_this.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 415 KiB |
BIN
fun/solves-this/tvix_solves_this.png
Normal file
BIN
fun/solves-this/tvix_solves_this.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 414 KiB |
|
|
@ -20,6 +20,7 @@ in
|
||||||
(mod "www/auth.snix.dev.nix")
|
(mod "www/auth.snix.dev.nix")
|
||||||
(mod "www/git.snix.dev.nix")
|
(mod "www/git.snix.dev.nix")
|
||||||
(mod "www/cache.snix.dev.nix")
|
(mod "www/cache.snix.dev.nix")
|
||||||
|
(mod "www/snix.systems.nix")
|
||||||
(mod "known-hosts.nix")
|
(mod "known-hosts.nix")
|
||||||
|
|
||||||
(depot.third_party.agenix.src + "/modules/age.nix")
|
(depot.third_party.agenix.src + "/modules/age.nix")
|
||||||
|
|
|
||||||
20
ops/modules/www/snix.systems.nix
Normal file
20
ops/modules/www/snix.systems.nix
Normal file
|
|
@ -0,0 +1,20 @@
|
||||||
|
{ depot, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
./base.nix
|
||||||
|
];
|
||||||
|
|
||||||
|
config = {
|
||||||
|
services.nginx.virtualHosts."snix.systems" = {
|
||||||
|
enableACME = true;
|
||||||
|
forceSSL = true;
|
||||||
|
root = depot.fun.solves-this.snix;
|
||||||
|
};
|
||||||
|
services.nginx.virtualHosts."tvix.systems" = {
|
||||||
|
enableACME = true;
|
||||||
|
forceSSL = true;
|
||||||
|
root = depot.fun.solves-this.tvix;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue