aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEuAndreh <eu@euandre.org>2020-12-24 06:44:58 -0300
committerEuAndreh <eu@euandre.org>2020-12-24 06:44:58 -0300
commit386201b1614624ecc7f6f85a5cb064b413ad67e4 (patch)
tree06139d352cb6f46a9ffc14239eb2a9476c79a663
parentAdd torrent.html page with WebTorrent (diff)
downloadeuandre.org-386201b1614624ecc7f6f85a5cb064b413ad67e4.tar.gz
euandre.org-386201b1614624ecc7f6f85a5cb064b413ad67e4.tar.xz
Add sh helper to enable feature flags
-rw-r--r--default.nix11
1 files changed, 11 insertions, 0 deletions
diff --git a/default.nix b/default.nix
index 801c50d..2640e08 100644
--- a/default.nix
+++ b/default.nix
@@ -63,6 +63,17 @@ in rec {
shellHook = ''
echo 'Starting a live server with:'
echo ' jekyll serve --future --livereload --trace'
+ echo 'Server with feature flags:'
+ echo ' jekyll serve --future --livereload --trace -c $(cfg torrent podcast)'
+
+ cfg() {
+ T="$(mktemp --suffix .yml)"
+ cp _config.yml "$T"
+ for flag in "$@"; do
+ printf '\n%s: true\n' "$flag" >> "$T"
+ done
+ echo "$T"
+ }
'';
};
publishScript = pkgs.writeShellScriptBin "publish.sh" ''