diff --git a/fun/solves-this/default.nix b/fun/solves-this/default.nix new file mode 100644 index 000000000..7b4690e07 --- /dev/null +++ b/fun/solves-this/default.nix @@ -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; +} diff --git a/fun/solves-this/index.html b/fun/solves-this/index.html new file mode 100644 index 000000000..d1f710634 --- /dev/null +++ b/fun/solves-this/index.html @@ -0,0 +1,41 @@ + + + + + @title@ + + + + + + + + +
+ The "Get Better Material" meme with "@title@" +
+ + diff --git a/fun/solves-this/snix_solves_this.png b/fun/solves-this/snix_solves_this.png new file mode 100644 index 000000000..9872145eb Binary files /dev/null and b/fun/solves-this/snix_solves_this.png differ diff --git a/fun/solves-this/tvix_solves_this.png b/fun/solves-this/tvix_solves_this.png new file mode 100644 index 000000000..c48850ede Binary files /dev/null and b/fun/solves-this/tvix_solves_this.png differ diff --git a/ops/machines/public01/default.nix b/ops/machines/public01/default.nix index c9b3c2067..d88fe221c 100644 --- a/ops/machines/public01/default.nix +++ b/ops/machines/public01/default.nix @@ -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") diff --git a/ops/modules/www/snix.systems.nix b/ops/modules/www/snix.systems.nix new file mode 100644 index 000000000..ac469bfce --- /dev/null +++ b/ops/modules/www/snix.systems.nix @@ -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; + }; + }; +}