From ef390b26eebeae2c454c4116edc1d6255eb7dcf3 Mon Sep 17 00:00:00 2001 From: Griffin Smith Date: Mon, 15 Jun 2020 20:44:06 -0400 Subject: feat(gws.fyi): add current source of gws.fyi This will soon be replaced with a pile of org, but for now- HTML! Change-Id: I54c15d5734fd3662ea4916553e0cd1b32cc0681f Reviewed-on: https://cl.tvl.fyi/c/depot/+/395 Reviewed-by: glittershark --- users/glittershark/gws.fyi/.envrc | 1 + users/glittershark/gws.fyi/.gitignore | 1 + users/glittershark/gws.fyi/Makefile | 22 ++++++++++++++++++++++ users/glittershark/gws.fyi/default.nix | 16 ++++++++++++++++ users/glittershark/gws.fyi/index.html | 31 +++++++++++++++++++++++++++++++ users/glittershark/gws.fyi/shell.nix | 9 +++++++++ 6 files changed, 80 insertions(+) create mode 100644 users/glittershark/gws.fyi/.envrc create mode 100644 users/glittershark/gws.fyi/.gitignore create mode 100644 users/glittershark/gws.fyi/Makefile create mode 100644 users/glittershark/gws.fyi/default.nix create mode 100644 users/glittershark/gws.fyi/index.html create mode 100644 users/glittershark/gws.fyi/shell.nix diff --git a/users/glittershark/gws.fyi/.envrc b/users/glittershark/gws.fyi/.envrc new file mode 100644 index 000000000000..be81feddb1a5 --- /dev/null +++ b/users/glittershark/gws.fyi/.envrc @@ -0,0 +1 @@ +eval "$(lorri direnv)" \ No newline at end of file diff --git a/users/glittershark/gws.fyi/.gitignore b/users/glittershark/gws.fyi/.gitignore new file mode 100644 index 000000000000..b2be92b7db01 --- /dev/null +++ b/users/glittershark/gws.fyi/.gitignore @@ -0,0 +1 @@ +result diff --git a/users/glittershark/gws.fyi/Makefile b/users/glittershark/gws.fyi/Makefile new file mode 100644 index 000000000000..d483e05d49c6 --- /dev/null +++ b/users/glittershark/gws.fyi/Makefile @@ -0,0 +1,22 @@ +.PHONY: deploy + +deploy: + @`nix-build --no-out-link` + +renew: + @echo Renewing... + @certbot renew \ + --manual \ + --preferred-challenges dns \ + --server https://acme-v02.api.letsencrypt.org/directory \ + --agree-tos \ + --work-dir $(shell pwd)/letsencrypt/work \ + --logs-dir $(shell pwd)/letsencrypt/logs \ + --config-dir $(shell pwd)/letsencrypt/config + +backup: + @tarsnap -cf $(shell uname -n)-letsencrypt-$(shell date +%Y-%m-%d_%H-%M-%S) \ + letsencrypt/ + +open: + $$BROWSER "http://gws.fyi" diff --git a/users/glittershark/gws.fyi/default.nix b/users/glittershark/gws.fyi/default.nix new file mode 100644 index 000000000000..6cf7c977e60b --- /dev/null +++ b/users/glittershark/gws.fyi/default.nix @@ -0,0 +1,16 @@ +with import {}; +let + bucket = "s3://gws.fyi"; + distributionID = "E2ST43JNBH8C64"; + website = + runCommand "gws.fyi" { } '' + mkdir -p $out + cp ${./index.html} $out/index.html + ''; +in writeShellScript "deploy.sh" '' + ${awscli}/bin/aws s3 sync ${website}/ ${bucket} + ${awscli}/bin/aws cloudfront create-invalidation \ + --distribution-id "${distributionID}" \ + --paths "/*" + echo "Deployed to http://gws.fyi" +'' diff --git a/users/glittershark/gws.fyi/index.html b/users/glittershark/gws.fyi/index.html new file mode 100644 index 000000000000..7f11bb94974e --- /dev/null +++ b/users/glittershark/gws.fyi/index.html @@ -0,0 +1,31 @@ + + + + + + griffin smith + + + my name is griffin ward smith (aka grfn, glittershark, gws) and i'm a software + engineer and musician + + + + contact + + + diff --git a/users/glittershark/gws.fyi/shell.nix b/users/glittershark/gws.fyi/shell.nix new file mode 100644 index 000000000000..41c77d3b80c1 --- /dev/null +++ b/users/glittershark/gws.fyi/shell.nix @@ -0,0 +1,9 @@ +with import {}; +mkShell { + buildInputs = [ + awscli + gnumake + letsencrypt + tarsnap + ]; +} -- cgit 1.4.1