Replace zsh update aliases with system-update-all script

This commit is contained in:
Evie Litherland-Smith 2024-06-05 16:39:29 +01:00
parent 7592b887a4
commit 1a7959808a
3 changed files with 16 additions and 4 deletions

View file

@ -70,10 +70,6 @@
"EDITOR" = "emacs -nw"; "EDITOR" = "emacs -nw";
"VISUAL" = "emacs"; "VISUAL" = "emacs";
}; };
shellAliases = {
nixos-switch = "sudo nixos-rebuild switch --flake flake:my-nixos --show-trace";
home-manager-switch = "nix run flake:my-home-manager -- switch --flake flake:my-home-manager --show-trace";
};
initExtra = '' initExtra = ''
## completion config and styling ## completion config and styling
zstyle ':completion:*' matcher-list 'm:{a-z}={A-Za-z}' zstyle ':completion:*' matcher-list 'm:{a-z}={A-Za-z}'

View file

@ -1,5 +1,7 @@
{pkgs, ...}: { {pkgs, ...}: {
home.packages = [ home.packages = [
(pkgs.writeShellScriptBin "system-update-all"
(builtins.readFile ./shell/system-update-all.sh))
(pkgs.writeShellScriptBin "git-sync-all" (pkgs.writeShellScriptBin "git-sync-all"
(builtins.readFile ./shell/git-sync-all.sh)) (builtins.readFile ./shell/git-sync-all.sh))
(pkgs.writeShellScriptBin "rsync-local-config" (pkgs.writeShellScriptBin "rsync-local-config"

View file

@ -0,0 +1,14 @@
NIXOS_CONFIGURATION="/etc/nixos"
HOME_MANAGER_CONFIGURATION="$HOME/.config/home-manager"
(
cd "$NIXOS_CONFIGURATION" || exit 1
git pull --ff --ff-only || exit 1
sudo nixos-rebuild switch
)
(
cd "$HOME_MANAGER_CONFIGURATION" || exit 1
git pull --ff --ff-only || exit 1
home-manager switch
)