From 6131cefaf3d9676d1e39c64681f34bcb9d6d1e53 Mon Sep 17 00:00:00 2001 From: Evie Litherland-Smith Date: Tue, 16 May 2023 15:58:12 +0100 Subject: [PATCH] Add shell shortcut to pull and update nixos config --- home/env/bash.nix | 5 ++++- home/env/fish.nix | 5 ++++- home/env/zsh.nix | 6 +++++- 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/home/env/bash.nix b/home/env/bash.nix index cdf78084..44abcbee 100644 --- a/home/env/bash.nix +++ b/home/env/bash.nix @@ -3,7 +3,10 @@ { programs.bash = { enable = true; - shellAliases = { lg = "lazygit"; }; + shellAliases = { + lg = "lazygit"; + nixos-update = "sudo git -c /etc/nixos/config pull && sudo nixos-rebuild switch"; + }; }; programs.keychain.enableBashIntegration = true; programs.starship.enableBashIntegration = true; diff --git a/home/env/fish.nix b/home/env/fish.nix index 31927974..3f158525 100644 --- a/home/env/fish.nix +++ b/home/env/fish.nix @@ -3,7 +3,10 @@ { programs.fish = { enable = true; - shellAbbrs = { lg = "lazygit"; }; + shellAbbrs = { + lg = "lazygit"; + nixos-update = "sudo git -c /etc/nixos/config pull && sudo nixos-rebuild switch"; + }; }; programs.keychain.enableFishIntegration = true; programs.starship.enableFishIntegration = true; diff --git a/home/env/zsh.nix b/home/env/zsh.nix index 037d67f9..0a9a49d4 100644 --- a/home/env/zsh.nix +++ b/home/env/zsh.nix @@ -3,7 +3,11 @@ { programs.zsh = { enable = true; - shellAliases = { ll = "ls -l"; lg = "lazygit"; }; + shellAliases = { + ll = "ls -l"; + lg = "lazygit"; + nixos-update = "sudo git -c /etc/nixos/config pull && sudo nixos-rebuild switch"; + }; history = { size = 10000; path = "${config.xdg.dataHome}/zsh/history";