Add j alias for just and autocompletions

This commit is contained in:
Dave Gallant
2024-03-14 22:41:42 -04:00
parent 12c41d07ab
commit 046b15b209
4 changed files with 13 additions and 16 deletions

View File

@@ -11,13 +11,13 @@ The configuration is very specific to my own machines and setup, but it may be a
Recipes are stored in a justfile. [just](https://github.com/casey/just) is required. Recipes are stored in a justfile. [just](https://github.com/casey/just) is required.
To run a nixos rebuild: To run a NixOS rebuild:
```sh ```sh
just build-linux just build-linux
``` ```
To run a darwin rebuild: To run a macOS rebuild:
```sh ```sh
just build-mac just build-mac

View File

@@ -9,6 +9,9 @@ in
{ {
home.stateVersion = "23.11"; home.stateVersion = "23.11";
home.packages = with pkgs; [ just ];
services = { services = {
gpg-agent = { gpg-agent = {
enable = stdenv.isLinux; enable = stdenv.isLinux;
@@ -164,21 +167,21 @@ in
g = "git"; g = "git";
gc = "git checkout $(git branch | fzf)"; gc = "git checkout $(git branch | fzf)";
gco = "git checkout $(git branch -r | sed -e 's/^ origin\\///' | fzf)"; gco = "git checkout $(git branch -r | sed -e 's/^ origin\\///' | fzf)";
gr = "cd $(git rev-parse --show-toplevel)";
gho = "gh repo view --web >/dev/null"; gho = "gh repo view --web >/dev/null";
gr = "cd $(git rev-parse --show-toplevel)";
grep = "rg --smart-case"; grep = "rg --smart-case";
j = "just";
k = "kubecolor"; k = "kubecolor";
kcx = "kubectx"; kcx = "kubectx";
kns = "kubens"; kns = "kubens";
l = "eza -la --git --group-directories-first"; l = "eza -la --git --group-directories-first";
m = "make"; m = "make";
nix-install = "nix-env -iA";
ps = "procs"; ps = "procs";
t = "tmux-sessionizer"; t = "tmux-sessionizer";
tf = "terraform"; tf = "terraform";
tree = "eza --tree"; tree = "eza --tree";
v = "nvim"; v = "nvim";
nix-install = "nix-env -iA";
brew-x86 = "arch -x86_64 /usr/local/homebrew/bin/brew";
}; };
"oh-my-zsh" = { "oh-my-zsh" = {
@@ -258,11 +261,6 @@ in
}; };
}; };
autojump = {
enable = true;
enableZshIntegration = true;
};
go = { go = {
enable = true; enable = true;
}; };

View File

@@ -1,18 +1,18 @@
set export set export
host := `hostname` config := "machines/$(hostname)/configuration.nix"
build-linux: build-linux:
nixos-rebuild --use-remote-sudo -I nixos-config=machines/$host/configuration.nix switch --flake . nixos-rebuild --use-remote-sudo -I nixos-config=$config switch --flake .
build-mac: build-mac:
darwin-rebuild switch -I nixos-config="machines/$host/configuration.nix" --flake . darwin-rebuild switch -I nixos-config=$config --flake .
rollback-linux: rollback-linux:
nixos-rebuild --use-remote-sudo switch --rollback -I nixos-config="machines/$host/configuration.nix" nixos-rebuild --use-remote-sudo switch --rollback -I nixos-config=$config
rollback-mac: rollback-mac:
darwin-rebuild --rollback -I nixos-config="machines/$host/configuration.nix" darwin-rebuild --rollback -I nixos-config=$config
update: update:
@./nix-flake-update.sh @./nix-flake-update.sh

View File

@@ -25,7 +25,6 @@ in
eza eza
fd fd
hadolint hadolint
just
nodePackages.eslint nodePackages.eslint
oha oha
pre-commit pre-commit