about summary refs log tree commit diff
path: root/users/glittershark/gws.fyi
diff options
context:
space:
mode:
Diffstat (limited to 'users/glittershark/gws.fyi')
-rw-r--r--users/glittershark/gws.fyi/Makefile2
-rw-r--r--users/glittershark/gws.fyi/default.nix7
-rw-r--r--users/glittershark/gws.fyi/index.html31
-rw-r--r--users/glittershark/gws.fyi/index.org15
-rw-r--r--users/glittershark/gws.fyi/orgExportHTML.nix45
-rw-r--r--users/glittershark/gws.fyi/site.nix9
6 files changed, 75 insertions, 34 deletions
diff --git a/users/glittershark/gws.fyi/Makefile b/users/glittershark/gws.fyi/Makefile
index d483e05d49c6..cfe3dd277d2e 100644
--- a/users/glittershark/gws.fyi/Makefile
+++ b/users/glittershark/gws.fyi/Makefile
@@ -1,7 +1,7 @@
 .PHONY: deploy
 
 deploy:
-	@`nix-build --no-out-link`
+	@$(shell nix-build `git rev-parse --show-toplevel` -A 'users.glittershark."gws.fyi"' --no-out-link)
 
 renew:
 	@echo Renewing...
diff --git a/users/glittershark/gws.fyi/default.nix b/users/glittershark/gws.fyi/default.nix
index 6cf7c977e60b..333f56f7bce7 100644
--- a/users/glittershark/gws.fyi/default.nix
+++ b/users/glittershark/gws.fyi/default.nix
@@ -1,12 +1,15 @@
-with import <nixpkgs> {};
+args@{ pkgs, ... }:
+with pkgs;
 let
+  site = import ./site.nix args;
   bucket = "s3://gws.fyi";
   distributionID = "E2ST43JNBH8C64";
   website =
     runCommand "gws.fyi" { } ''
       mkdir -p $out
-      cp ${./index.html} $out/index.html
+      cp ${site.index} $out/index.html
     '';
+
 in writeShellScript "deploy.sh" ''
   ${awscli}/bin/aws s3 sync ${website}/ ${bucket}
   ${awscli}/bin/aws cloudfront create-invalidation \
diff --git a/users/glittershark/gws.fyi/index.html b/users/glittershark/gws.fyi/index.html
deleted file mode 100644
index 7f11bb94974e..000000000000
--- a/users/glittershark/gws.fyi/index.html
+++ /dev/null
@@ -1,31 +0,0 @@
-<!DOCTYPE html>
-<head>
-  <meta charset="utf-8">
-  <meta name="viewport" content="width=device-width, initial-scale=1">
-  <meta name="description" content="Griffin has a website now">
-  <title>griffin smith</title>
-</head>
-<body>
-  my name is griffin ward smith (aka grfn, glittershark, gws) and i'm a software
-  engineer and musician
-
-  <ul>
-    <li><a href="https://github.com/glittershark/">github</a></li>
-    <li><a href="https://sacrosanct.bandcamp.com/">music</a></li>
-  </ul>
-
-  contact
-
-  <ul>
-    <li><a href="mailto:root@gws.fyi">root@gws.fyi</a></li>
-    <li><a href="https://twitter.com/glittershark1">twitter</a></li>
-    <li><a href="https://keybase.io/glittershark">keybase</a></li>
-    <li>
-      <a href="http://keys.gnupg.net/pks/lookup?op=get&search=0x44EF5B5E861C09A7">
-        gpg key: 0F11A989879E8BBBFDC1E23644EF5B5E861C09A7
-      </a>
-      <br>
-      verify with keybase, if you don't trust this site's lack of SSL
-    </li>
-  </ul>
-</body>
diff --git a/users/glittershark/gws.fyi/index.org b/users/glittershark/gws.fyi/index.org
new file mode 100644
index 000000000000..2af54253db98
--- /dev/null
+++ b/users/glittershark/gws.fyi/index.org
@@ -0,0 +1,15 @@
+my name is griffin ward smith (aka grfn, glittershark, gws) and i'm a software
+engineer and musician
+
+- [[https://github.com/glittershark/][github]]
+- music
+  - https://sacrosanct.bandcamp.com/, a post-rock project with a [[https://bandcamp.com/h34rken][friend of mine]]
+  - [[https://soundcloud.com/missingggg][my current soundcloud]], releasing instrumental hip-hop under the name missing
+
+contact
+
+- [[mailto:web@gws.fyi][web@gws.fyi]]
+- [[https://twitter.com/glittershark1][twitter]]
+- https://keybase.io/glittershark
+- glittershark on freenode
+- [[http://keys.gnupg.net/pks/lookup?op=get&search=0x44EF5B5E861C09A7][gpg key: 0F11A989879E8BBBFDC1E23644EF5B5E861C09A7]]
diff --git a/users/glittershark/gws.fyi/orgExportHTML.nix b/users/glittershark/gws.fyi/orgExportHTML.nix
new file mode 100644
index 000000000000..b37be10045dd
--- /dev/null
+++ b/users/glittershark/gws.fyi/orgExportHTML.nix
@@ -0,0 +1,45 @@
+{ pkgs, ... }:
+
+with pkgs;
+with lib;
+
+let
+
+  emacs-nixpkgs =
+    (import <nixpkgs> {
+      overlays = [(import (builtins.fetchTarball {
+        url = "https://github.com/nix-community/emacs-overlay/archive/54afb061bdd12c61bbfcc13bad98b7a3aab7d8d3.tar.gz";
+        sha256 = "0hrbg65d5h0cb0nky7a46md7vlvhajq1hf0328l2f7ln9hznqz6j";
+      }))];
+    });
+
+  emacs = (emacs-nixpkgs.emacsPackagesFor emacs-nixpkgs.emacsUnstable)
+    .emacsWithPackages (p: with p; [
+      org
+    ]);
+
+in
+
+src:
+
+let
+
+  outName =
+    let bn = builtins.baseNameOf src;
+        filename = elemAt (splitString "." bn) 0;
+    in filename + ".html";
+
+in
+
+runCommand outName {} ''
+  cp ${src} file.org
+  echo "${emacs}/bin/emacs --batch"
+  ${emacs}/bin/emacs --batch \
+    --load ${./config.el} \
+    --visit file.org \
+    --eval "(progn
+      (require 'org)
+      (org-html-export-to-html))" \
+    --kill
+  cp file.html $out
+''
diff --git a/users/glittershark/gws.fyi/site.nix b/users/glittershark/gws.fyi/site.nix
new file mode 100644
index 000000000000..5a06203a6b1e
--- /dev/null
+++ b/users/glittershark/gws.fyi/site.nix
@@ -0,0 +1,9 @@
+args@{ pkgs, depot, ... }:
+
+let
+  orgExportHTML = import ./orgExportHTML.nix args;
+in
+
+{
+  index = orgExportHTML ./index.org;
+}