From 379e7dc6e93bddaff85e0f485d26aa055679eccb Mon Sep 17 00:00:00 2001 From: Youwen Wu Date: Wed, 31 Jul 2024 18:08:25 -0700 Subject: [PATCH] feat: add update-nixos command --- home.nix | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/home.nix b/home.nix index 77ac1bb..410a524 100755 --- a/home.nix +++ b/home.nix @@ -240,6 +240,16 @@ rebuild = "sudo nixos-rebuild switch"; 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 = '' fish_vi_key_bindings set -g fish_greeting