From 740f5fbb1006c9c3ac455f0347209acc2378fa3f Mon Sep 17 00:00:00 2001 From: Infinidoge Date: Fri, 22 Oct 2021 12:18:14 -0400 Subject: [PATCH] bud: add install-doom command --- bud/default.nix | 7 +++++++ bud/install-doom.bash | 8 ++++++++ 2 files changed, 15 insertions(+) create mode 100644 bud/install-doom.bash diff --git a/bud/default.nix b/bud/default.nix index 1289063..63569a0 100644 --- a/bud/default.nix +++ b/bud/default.nix @@ -13,5 +13,12 @@ help = "Shortcut for nixos-rebuild using the current hostname"; script = ./buildthis.bash; }; + + install-doom = { + writer = budUtils.writeBashWithPaths [ git coreutils emacs ]; + synopsis = "install-doom [ARGS]"; + help = "Installs Doom Emacs from https://github.com/hlissner/doom-emacs"; + script = ./install-doom.bash; + }; }; } diff --git a/bud/install-doom.bash b/bud/install-doom.bash new file mode 100644 index 0000000..3d7d0b5 --- /dev/null +++ b/bud/install-doom.bash @@ -0,0 +1,8 @@ +#!/usr/bin/env bash + +if [ -x $XDG_CONFIG_HOME/emacs ]; then + git clone --depth 1 https://github.com/hlissner/doom-emacs $XDG_CONFIG_HOME/emacs + $XDG_CONFIG_HOME/emacs/bin/doom install "$@" +else + echo "fatal: $XDG_CONFIG_HOME/emacs already exists!" +fi