]> git.immae.eu Git - perso/Immae/Config/Nix.git/commitdiff
Add postHook to highlight nix messages
authorIsmaël Bouya <ismael.bouya@normalesup.org>
Thu, 20 Dec 2018 23:52:32 +0000 (00:52 +0100)
committerIsmaël Bouya <ismael.bouya@normalesup.org>
Thu, 20 Dec 2018 23:52:32 +0000 (00:52 +0100)
default.nix

index 28767a9b2dea0225c2da423ea8be9b4789964128..b5dad697f75b8891c5a8651312c365316c0677f3 100644 (file)
@@ -1,6 +1,21 @@
 with import <nixpkgs> {};
 let
   nixpkgs = import <nixpkgs> {};
+  postHook =  ''
+    header() {
+      echo -ne "\033[1;36m"
+      echo -n "$1"
+      echo -e "\033[0m"
+    }
+
+    echoCmd() {
+      printf "\033[1;34m%s:\033[0m" "$1"
+      shift
+      printf ' %q' "$@"
+      echo
+    }
+  '';
+
   fetchedGithub = path:
     let
       json = lib.importJSON path;