mirror of
https://github.com/davegallant/nix-config
synced 2025-08-05 10:33:39 +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.
|
||||
|
||||
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
|
||||
|
@@ -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;
|
||||
};
|
||||
|
10
justfile
10
justfile
@@ -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
|
||||
|
@@ -25,7 +25,6 @@ in
|
||||
eza
|
||||
fd
|
||||
hadolint
|
||||
just
|
||||
nodePackages.eslint
|
||||
oha
|
||||
pre-commit
|
||||
|
Reference in New Issue
Block a user