feat: add update-nixos command

This commit is contained in:
Youwen Wu 2024-07-31 18:08:25 -07:00
parent 20247f6621
commit 379e7dc6e9
Signed by: youwen5
GPG key ID: 865658ED1FE61EC3

View file

@ -240,6 +240,16 @@
rebuild = "sudo nixos-rebuild switch"; rebuild = "sudo nixos-rebuild switch";
ls = "eza -l --icons=auto"; ls = "eza -l --icons=auto";
}; };
functions = {
update-nixos = {
description =
"Update the system flake and attempt to build and switch to the new configuration.";
body = ''
nix flake update /etc/nixos
sudo nixos-rebuild switch
'';
};
};
interactiveShellInit = '' interactiveShellInit = ''
fish_vi_key_bindings fish_vi_key_bindings
set -g fish_greeting set -g fish_greeting