bud: move to shell and use git clone for get
This commit is contained in:
parent
efc3380e13
commit
1a6f024d99
4 changed files with 6 additions and 3 deletions
9
shell/bud/buildthis.bash
Normal file
9
shell/bud/buildthis.bash
Normal file
|
@ -0,0 +1,9 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
attr="$FLAKEROOT#$HOST"
|
||||
if [ -x /run/wrappers/bin/sudo ]; then
|
||||
export PATH=/run/wrappers/bin:$PATH
|
||||
sudo nixos-rebuild --flake "$attr" "${@:-switch}"
|
||||
else
|
||||
nixos-rebuild --flake "$attr" "${@:-switch}"
|
||||
fi
|
17
shell/bud/default.nix
Normal file
17
shell/bud/default.nix
Normal file
|
@ -0,0 +1,17 @@
|
|||
{ pkgs, lib, budUtils, ... }: {
|
||||
bud.cmds = with pkgs; {
|
||||
buildthis = {
|
||||
writer = budUtils.writeBashWithPaths [ nixUnstable nixos-rebuild git coreutils mercurial ];
|
||||
synopsis = "buildthis (switch|boot|test)";
|
||||
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;
|
||||
};
|
||||
};
|
||||
}
|
8
shell/bud/install-doom.bash
Normal file
8
shell/bud/install-doom.bash
Normal file
|
@ -0,0 +1,8 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
if [ ! -d $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
|
Loading…
Add table
Add a link
Reference in a new issue