mirror of
https://github.com/davegallant/nix-config
synced 2025-08-05 23:03:40 +00:00
Add j alias for just and autocompletions
This commit is contained in:
@@ -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
|
||||||
|
@@ -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;
|
||||||
};
|
};
|
||||||
|
10
justfile
10
justfile
@@ -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
|
||||||
|
@@ -25,7 +25,6 @@ in
|
|||||||
eza
|
eza
|
||||||
fd
|
fd
|
||||||
hadolint
|
hadolint
|
||||||
just
|
|
||||||
nodePackages.eslint
|
nodePackages.eslint
|
||||||
oha
|
oha
|
||||||
pre-commit
|
pre-commit
|
||||||
|
Reference in New Issue
Block a user