Replace zsh update aliases with system-update-all script
This commit is contained in:
parent
7592b887a4
commit
1a7959808a
|
@ -70,10 +70,6 @@
|
|||
"EDITOR" = "emacs -nw";
|
||||
"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 = ''
|
||||
## completion config and styling
|
||||
zstyle ':completion:*' matcher-list 'm:{a-z}={A-Za-z}'
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
{pkgs, ...}: {
|
||||
home.packages = [
|
||||
(pkgs.writeShellScriptBin "system-update-all"
|
||||
(builtins.readFile ./shell/system-update-all.sh))
|
||||
(pkgs.writeShellScriptBin "git-sync-all"
|
||||
(builtins.readFile ./shell/git-sync-all.sh))
|
||||
(pkgs.writeShellScriptBin "rsync-local-config"
|
||||
|
|
14
scripts/shell/system-update-all.sh
Normal file
14
scripts/shell/system-update-all.sh
Normal 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
|
||||
)
|
Reference in a new issue