4 nixops-vmdk: $(dir $(NIXOPS_STATE))/virtualbox/nixops.vmdk
5 .PHONY: $(dir $(NIXOPS_STATE))/virtualbox/nixops.vmdk
6 $(dir $(NIXOPS_STATE))/virtualbox/nixops.vmdk:
7 # NOTE: user's TMPDIR may be too small
9 time nix $(NIX_FLAGS) build \
10 --out-link .cache/nixops/virtualbox \
11 --argstr system x86_64-linux \
12 -f "<nixpkgs-commonsoft/build/pkgs/installer/nixops-virtualbox>"
17 nixops-create: $(dir $(NIXOPS_STATE))
18 $(if $(filter $(NIXOPS_DEPLOYMENT),$(nixops-deployment)),,\
23 nixops-modify: $(NIXOPS_STATE)
28 $(dir $(NIXOPS_STATE)):
30 nixops-deployment = $(shell \
31 test ! -f $(NIXOPS_STATE) || \
32 sqlite3 $(NIXOPS_STATE) \
33 "select value from DeploymentAttrs \
34 where name='name' and value='$(NIXOPS_DEPLOYMENT)';")
39 nixops-deploy: nixops-create
40 sudo modprobe vboxnetadp
41 sudo modprobe vboxnetflt
42 time nixops deploy $(NIXOPS_OPTS) $(NIX_DEPLOY_FLAGS)
44 #time disnixos-env --use-nixops \
45 # -s install/disnix/services.nix \
46 # -d install/disnix/distribution.nix \
47 # -n install/logical.nix \
48 # -n install/physical.nix
49 %/offline: NIX_BUILD_FLAGS+=--option substituters ""
50 %/offline: NIX_DEPLOY_FLAGS+=--option substituters ""
53 %/verbose: NIX_FLAGS+=-v -v -v
63 nixops-state-dump: $(NIXOPS_STATE)
64 sqlite3 $(NIXOPS_STATE) .dump
66 sqlite3 $(NIXOPS_STATE) \
67 'update ResourceAttrs set value = "$(IPv4)" where name="privateIpv4"'