1 include .lib/nix/Makefile.make
8 nix $(NIX) build -f build \
10 --show-trace $(NIX_BUILD)
19 vmdk: var/virtualbox/nixops.vmdk
20 .PHONY: var/virtualbox/nixops.vmdk
22 var/virtualbox/nixops.vmdk:
23 # NOTE: user's TMPDIR may be too small
25 time nix $(NIX) build \
26 --out-link var/virtualbox \
27 --argstr system x86_64-linux \
28 -f "<nixpkgs-commonsoft/build/pkgs/installer/nixops-virtualbox>"
33 create: $(dir $(NIXOPS_STATE))
34 $(if $(filter $(NIXOPS_DEPLOYMENT),$(deployment)),,\
39 modify: $(NIXOPS_STATE)
45 $(dir $(NIXOPS_STATE)):
48 deployment = $(shell \
49 test ! -f $(NIXOPS_STATE) || \
50 sqlite3 $(NIXOPS_STATE) \
51 "select value from DeploymentAttrs \
52 where name='name' and value='$(NIXOPS_DEPLOYMENT)';")
58 time nixops deploy $(NIXOPS_OPTS) $(NIXOPS_DEPLOY)
60 #time disnixos-env --use-nixops \
61 # -s install/disnix/services.nix \
62 # -d install/disnix/distribution.nix \
63 # -n install/logical.nix \
64 # -n install/physical.nix
65 %/offline: NIX_BUILD+=--option substituters ""
66 %/offline: NIXOPS_DEPLOY+=--option substituters ""
69 %/verbose: NIX+=-v -v -v
79 state: $(NIXOPS_STATE)
80 sqlite3 $(NIXOPS_STATE) .dump
83 sqlite3 $(NIXOPS_STATE) \
84 'update ResourceAttrs set value = "$(IPv4)" where name="privateIpv4"'