enable rebuild app command

This commit is contained in:
Noah Masur 2022-12-10 15:48:05 -07:00
parent 2620b43925
commit 1d8638777c

View File

@ -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
'');
};