about summary refs log tree commit diff
diff options
context:
space:
mode:
authorWilliam Carroll <wpcarro@gmail.com>2020-03-16T16·54+0000
committerWilliam Carroll <wpcarro@gmail.com>2020-03-16T16·54+0000
commiteb402bca744e07a54a420900586064a6cbc41403 (patch)
treea41e8d63770cc181d2bdcaba7c4ab34e51112f63
parentebf0ef7e34aa933f87b51ad5c36225aa29a0bc6c (diff)
Create derivation for learn.wpcarro.dev
Creating a derivation to abstract over the build process for learn.wpcarro.dev.
-rw-r--r--default.nix1
-rw-r--r--learn/default.nix10
-rw-r--r--nixos/socrates/configuration.nix4
3 files changed, 12 insertions, 3 deletions
diff --git a/default.nix b/default.nix
index 57bcb4e2b786..2570a524b3f2 100644
--- a/default.nix
+++ b/default.nix
@@ -10,6 +10,7 @@ in {
   nixos       = readTree ./nixos;
   utils       = readTree ./utils;
   emacs       = readTree ./emacs;
+  learn       = readTree ./learn;
   blog        = readTree ./blog;
   lisp        = readTree ./lisp;
   gopkgs      = readTree ./gopkgs;
diff --git a/learn/default.nix b/learn/default.nix
new file mode 100644
index 000000000000..7aa8975a45fa
--- /dev/null
+++ b/learn/default.nix
@@ -0,0 +1,10 @@
+{ pkgs, ... }:
+
+pkgs.stdenv.mkDerivation {
+  name = "learn.wpcarro.dev";
+  src = ./static;
+  buildPhase = ''
+    cp -R $src $out
+  '';
+  dontInstall = true;
+}
diff --git a/nixos/socrates/configuration.nix b/nixos/socrates/configuration.nix
index 94ef03def472..09e5afb09b92 100644
--- a/nixos/socrates/configuration.nix
+++ b/nixos/socrates/configuration.nix
@@ -157,9 +157,7 @@ in {
       "learn.wpcarro.dev" = {
         addSSL = true;
         enableACME = true;
-        # TODO(wpcarro): Prefer creating a default.nix in //learn and using
-        # briefcase.learn as root.
-        root = /home/wpcarro/briefcase/learn/static;
+        root = briefcase.learn;
       };
       "git.wpcarro.dev" = {
         addSSL = true;