summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--flake.nix14
1 files changed, 14 insertions, 0 deletions
diff --git a/flake.nix b/flake.nix
index 857f4fe..570f9cc 100644
--- a/flake.nix
+++ b/flake.nix
@@ -14,6 +14,20 @@
buildInputs = with pkgs; [
hugo
];
+
+ shellHook = ''
+ SITE="$HOME/projects/tdback.net"
+
+ new-post() {
+ hugo new "posts/$1/index.md"
+ $EDITOR "$SITE/content/posts/$1/index.md"
+ }
+
+ del-post() {
+ POST="$SITE/content/posts/$1"
+ [ -d $POST ] && rm -r $POST
+ }
+ '';
};
});
}