From 3083d9314315d8c3833f9dcdf310da07c438a9ee Mon Sep 17 00:00:00 2001 From: TrudeEH Date: Thu, 10 Oct 2024 17:10:19 +0100 Subject: [PATCH] Update update command --- nix/home.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/nix/home.nix b/nix/home.nix index 04f64cee..02e57b62 100644 --- a/nix/home.nix +++ b/nix/home.nix @@ -62,15 +62,15 @@ in '') (writeShellScriptBin "update" '' + nix-channel --update if command -v nixos-rebuild 2>&1 >/dev/null; then sudo nixos-rebuild switch --recreate-lock-file --flake /etc/nixos#default - fi - if command -v darwin-rebuild 2>&1 >/dev/null; then + elif command -v darwin-rebuild 2>&1 >/dev/null; then sudo softwareupdate -i -a nix run nix-darwin -- switch --recreate-lock-file --flake ~/.config/nix-darwin + else + home-manager -b backup switch fi - nix-channel --update - home-manager -b backup switch '') ] # Linux-only apps