From 9c5fca989c411887be7e3f98cae83b59c963c4db Mon Sep 17 00:00:00 2001 From: jopejoe1 Date: Mon, 27 Feb 2023 17:33:08 +0100 Subject: [PATCH] Add bash stuff --- modules/user/jopejoe1/home/default.nix | 8 ++++++++ modules/user/root/home/default.nix | 5 +---- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/modules/user/jopejoe1/home/default.nix b/modules/user/jopejoe1/home/default.nix index 1bc5cfa..07badc4 100644 --- a/modules/user/jopejoe1/home/default.nix +++ b/modules/user/jopejoe1/home/default.nix @@ -175,6 +175,14 @@ in }; }; }; + bash = { + enable = true; + historyFile = "${hcfg.xdg.stateHome}/bash/history"; + shellAliases = { + gc = "sudo nix store gc"; + rb = "sudo git -C /etc/nixos pull && sudo nix flake update /etc/nixos/ && sudo nixos-rebuild switch && sudo git -C /etc/nixos add . && sudo git -C /etc/nixos commit -m 'Updated flake.lock' && sudo git -C /etc/nixos push"; + }; + }; }; }; }; diff --git a/modules/user/root/home/default.nix b/modules/user/root/home/default.nix index a41744b..1fe9c51 100644 --- a/modules/user/root/home/default.nix +++ b/modules/user/root/home/default.nix @@ -59,10 +59,7 @@ in bash = { enable = true; historyFile = "${hcfg.xdg.stateHome}/bash/history"; - shellAliases = { - gc = "sudo nix store gc"; - rb = "sudo nix flake update /etc/nixos/ && sudo nixos-rebuild switch"; - }; + rb = "sudo git -C /etc/nixos pull && sudo nix flake update /etc/nixos/ && sudo nixos-rebuild switch && sudo git -C /etc/nixos add . && sudo git -C /etc/nixos commit -m 'Updated flake.lock' && sudo git -C /etc/nixos push"; }; zsh.shellAliases = hcfg.programs.bash.shellAliases; fish.shellAbbrs = hcfg.programs.bash.shellAliases;