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.
To run a nixos rebuild:
To run a NixOS rebuild:
```sh
just build-linux
```
To run a darwin rebuild:
To run a macOS rebuild:
```sh
just build-mac

View File

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

View File

@@ -1,18 +1,18 @@
set export
host := `hostname`
config := "machines/$(hostname)/configuration.nix"
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:
darwin-rebuild switch -I nixos-config="machines/$host/configuration.nix" --flake .
darwin-rebuild switch -I nixos-config=$config --flake .
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:
darwin-rebuild --rollback -I nixos-config="machines/$host/configuration.nix"
darwin-rebuild --rollback -I nixos-config=$config
update:
@./nix-flake-update.sh

View File

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