mirror of
https://github.com/nmasur/dotfiles
synced 2024-12-26 17:34:54 +00:00
16 lines
389 B
Nix
16 lines
389 B
Nix
|
{ pkgs, ... }: {
|
||
|
|
||
|
type = "app";
|
||
|
|
||
|
program = builtins.toString (pkgs.writeShellScript "rebuild" ''
|
||
|
echo ${pkgs.system}
|
||
|
SYSTEM=${if pkgs.stdenv.isDarwin then "darwin" else "linux"}
|
||
|
if [ "$SYSTEM" == "darwin" ]; then
|
||
|
darwin-rebuild switch --flake github:nmasur/dotfiles#lookingglass
|
||
|
else
|
||
|
nixos-rebuild switch --flake github:nmasur/dotfiles
|
||
|
fi
|
||
|
'');
|
||
|
|
||
|
}
|