Makefile (781B)
1 DEVICE=root@biscuit.lan 2 NFLAGS=-I nixpkgs=../nixpkgs -I eculocate=../eculocate 3 export NIXPKGS_ALLOW_UNFREE=1 4 5 6 .PHONY: toplevel android-bootimg default update android-recovery android-extlinux-boot 7 8 default toplevel: 9 nix-build $(NFLAGS) -A outputs.$@ -o $@ 10 11 android-bootimg android-recovery android-extlinux-boot: 12 nix-build $(NFLAGS) -A outputs.android.$@ -o $@ 13 14 lk2nd: 15 nix-build $(NFLAGS) ../mobile-nixos --argstr device motorola-harpia -A pkgs.pkgsBuildBuild.lk2nd.msm8916 -o lk2nd 16 17 18 update: toplevel 19 nix-copy-closure --to $(DEVICE) -v --include-outputs ./toplevel 20 ssh $(DEVICE) "nix-env --profile /nix/var/nix/profiles/system --set `readlink toplevel` && /nix/var/nix/profiles/system/bin/switch-to-configuration switch" 21 rsync -av local/secrets/ $(DEVICE):/etc/secrets