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:
Florian Klink 2025-05-12 16:53:00 +03:00 committed by clbot
parent a11099fd1c
commit e285cbe8cf
6 changed files with 75 additions and 0 deletions

View 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;
}

View 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 &quot;Get Better Material&quot; meme with &quot;@title@&quot;" />
</div>
</body>
</html>

Binary file not shown.

After

Width:  |  Height:  |  Size: 415 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 414 KiB

View file

@ -20,6 +20,7 @@ in
(mod "www/auth.snix.dev.nix")
(mod "www/git.snix.dev.nix")
(mod "www/cache.snix.dev.nix")
(mod "www/snix.systems.nix")
(mod "known-hosts.nix")
(depot.third_party.agenix.src + "/modules/age.nix")

View 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;
};
};
}