From b51058d2503bf689f2954bd0a4c6a24bdf3a80a5 Mon Sep 17 00:00:00 2001 From: Frank LoTurco Date: Tue, 15 Sep 2026 12:16:05 -0400 Subject: [PATCH] various: update shell init and move around aliases --- home/frank.nix | 24 +++++++++++++++++++++++- hosts/shared/darwin.nix | 11 +++++++++-- hosts/shared/nixos-pc.nix | 6 +++++- 3 files changed, 37 insertions(+), 4 deletions(-) diff --git a/home/frank.nix b/home/frank.nix index 5dd3873..61fb0ef 100644 --- a/home/frank.nix +++ b/home/frank.nix @@ -7,13 +7,35 @@ in inputs.lazyvim.homeManagerModules.default ]; + home.shellAliases = { + l = "ls -alh"; + ll = "ls -l"; + ls = "ls --color=tty"; + gs = "git status"; + ga = "git add"; + gc = "git commit -m"; + gpll = "git pull"; + gpsh = "git push"; + ff = "clear;fastfetch --logo nixos2"; + ffw = "clear;fastfetch --logo nixos2;printf '\n';weather kmco"; + wget = "wget --hsts-file=$XDG_DATA_HOME/wget-hsts"; + nix-rebuild = + if pkgs.stdenv.hostPlatform.isDarwin then + "sudo darwin-rebuild switch" + else + "sudo nixos-rebuild switch"; + }; + programs = { bash = { enable = true; - # Display fastfetch on shell open. + # Import SSH identities and + # display fastfetch on shell open. initExtra = '' eval "$(devenv hook bash)" + [ -f $HOME/.ssh/id_floturcocantsee@daguerro.net ] && ssh-add $HOME/.ssh/id_floturcocantsee@daguerro.net + [ -f $HOME/.ssh/id_rsa ] && ssh-add $HOME/.ssh/id_rsa clear;fastfetch ''; }; diff --git a/hosts/shared/darwin.nix b/hosts/shared/darwin.nix index 2cd1c30..321e449 100644 --- a/hosts/shared/darwin.nix +++ b/hosts/shared/darwin.nix @@ -61,8 +61,15 @@ l = "ls -alh"; ll = "ls -l"; ls = "ls --color=tty"; - ff = "clear;fastfetch"; - nb = "nix-build"; + gs = "git status"; + ga = "git add"; + gc = "git commit -m"; + gpll = "git pull"; + gpsh = "git push"; + ff = "clear;fastfetch --logo nixos2"; + ffw = "clear;fastfetch --logo nixos2;printf '\n';weather kmco"; + wget = "wget --hsts-file=$XDG_DATA_HOME/wget-hsts"; + nix-rebuild = "sudo darwin-rebuild switch"; }; systemPackages = with pkgs; [ diff --git a/hosts/shared/nixos-pc.nix b/hosts/shared/nixos-pc.nix index a3914e0..8bdd8bd 100644 --- a/hosts/shared/nixos-pc.nix +++ b/hosts/shared/nixos-pc.nix @@ -389,10 +389,14 @@ in l = "ls -alh"; ll = "ls -l"; ls = "ls --color=tty"; + gs = "git status"; + ga = "git add"; + gc = "git commit -m"; + gpll = "git pull"; + gpsh = "git push"; ff = "clear;fastfetch --logo nixos2"; ffw = "clear;fastfetch --logo nixos2;printf '\n';weather kmco"; wget = "wget --hsts-file=$XDG_DATA_HOME/wget-hsts"; - nb = "nix-build"; nix-rebuild = "sudo nixos-rebuild switch"; };