From 1d8638777c35579be776e19ee57333f694701831 Mon Sep 17 00:00:00 2001 From: Noah Masur <7386960+nmasur@users.noreply.github.com> Date: Sat, 10 Dec 2022 15:48:05 -0700 Subject: [PATCH] enable rebuild app command --- apps/default.nix | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/apps/default.nix b/apps/default.nix index f172bfb..6c977d0 100644 --- a/apps/default.nix +++ b/apps/default.nix @@ -32,7 +32,12 @@ type = "app"; program = builtins.toString (pkgs.writeShellScript "rebuild" '' echo ${pkgs.system} - echo ${if pkgs.stdenv.isDarwin then "darwin" else "linux"} + SYSTEM=${if pkgs.stdenv.isDarwin then "darwin" else "linux"} + if [ "$SYSTEM" == "darwin" ]; then + darwin-rebuild switch --flake github:nmasur/dotfiles#macbook + else + nixos-rebuild switch --flake github:nmasur/dotfiles + fi ''); };