From eb402bca744e07a54a420900586064a6cbc41403 Mon Sep 17 00:00:00 2001 From: William Carroll Date: Mon, 16 Mar 2020 16:54:16 +0000 Subject: [PATCH] Create derivation for learn.wpcarro.dev Creating a derivation to abstract over the build process for learn.wpcarro.dev. --- default.nix | 1 + learn/default.nix | 10 ++++++++++ nixos/socrates/configuration.nix | 4 +--- 3 files changed, 12 insertions(+), 3 deletions(-) create mode 100644 learn/default.nix diff --git a/default.nix b/default.nix index 57bcb4e2b..2570a524b 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 000000000..7aa8975a4 --- /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 94ef03def..09e5afb09 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;