From bfad276eb58dcbbc9ae29128c75f385f9e6e7bf9 Mon Sep 17 00:00:00 2001 From: iFargle Date: Fri, 1 Sep 2023 17:22:07 +0900 Subject: [PATCH] test --- home-manager/common/software/cli/bash.nix | 31 ++++++++++++----------- 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/home-manager/common/software/cli/bash.nix b/home-manager/common/software/cli/bash.nix index 2f4f1b88..44b31cf6 100644 --- a/home-manager/common/software/cli/bash.nix +++ b/home-manager/common/software/cli/bash.nix @@ -9,7 +9,7 @@ # https://github.com/justjanne/powerline-go#customization settings = { hostname-only-if-ssh = true; - cwd-max-depth = 2; + cwd-max-depth = 1; condensed = true; theme = "gruvbox"; }; @@ -24,8 +24,6 @@ "git" "docker" "exit" - ]; - modulesRight = [ "root" ]; }; @@ -34,11 +32,13 @@ bash = { enable = true; enableCompletion = true; + initExtra = '' + GPG_TTY=$(tty) + ''; sessionVariables = { # Set the GTK Theme # GTK_THEME = "Gruvbox-Dark-BL"; XDG_DATA_HOME = "$HOME/.local/share"; - GPG_TTY="$(tty)"; # Disable askpass for cli auth: SSH_ASKPASS = ""; }; @@ -46,9 +46,11 @@ sops-edit() { nix-shell -p sops --run "sops $1" } + sops-update() { nix-shell -p sops --run "sops updatekeys $1" } + nix-clean-all() { sudo nix-channel --update sudo nix-env -u --always @@ -56,7 +58,6 @@ } ''; shellAliases = { - # nVidia prime selector alias: prime-select = "nvidia-offload"; @@ -64,7 +65,7 @@ emacs = "emacs -nw"; # docker - d = "docker"; + d = "docker"; dc = "docker-compose"; de = "docker exec -it"; @@ -77,25 +78,25 @@ # git g = "git"; - ga = "git add -A"; - gb = "git branch"; - gc = "git commit"; + ga = "git add -A"; + gb = "git branch"; + gc = "git commit"; gca = "git commit -a"; gco = "git checkout"; - gd = "git diff"; - gp = "git pull --prune"; + gd = "git diff"; + gp = "git pull --prune"; gpu = "git push origin HEAD"; - gs = "git status -sb"; + gs = "git status -sb"; # time / date tdate = "date +%Y.%m.%d..%H.%M"; ttime = "date +%H.%M"; ddate = "date +%Y.%m.%d"; - dday = "date +%A"; + dday = "date +%A"; # nixos-rebuild - ns = "nix-shell -p"; - nr = "sudo nixos-rebuild"; + ns = "nix-shell -p"; + nr = "sudo nixos-rebuild"; nrs = "sudo nixos-rebuild --upgrade switch"; nrt = "sudo nixos-rebuild test"; nrb = "sudo nixos-rebuild build";