nix: update inputs
[sourcephile-nix.git] / Makefile
index f3987e0a6e4cee2a86b4c57c43ccd3fd1e838720..bda7b86fd7443da6215cad7674dda2946623766a 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,79 +1,9 @@
-#
-## init
-###
-.PHONY: build
-build:
-       nix build -f build \
-        --out-link result \
-        --show-trace $(NIX_BUILD)
-       tree result/
+all: init
 
-init: build
-       result/bin/init
+.PHONY: var/named.root
+var/named.root:
+       mkdir -p $(@D)
+       curl >$@ -L https://www.internic.net/domain/named.root
 
-#
-## vmdk
-###
-vmdk: var/virtualbox/nixops.vmdk
-.PHONY: var/virtualbox/nixops.vmdk
-
-var/virtualbox/nixops.vmdk:
-       # NOTE: user's TMPDIR may be too small
-       TMPDIR=/tmp \
-       time nix build \
-        --out-link var/virtualbox \
-        --argstr system x86_64-linux \
-        -f "<nixsys/build/pkgs/installer/nixops-virtualbox>"
-
-#
-## create
-###
-create: $(dir $(NIXOPS_STATE))
-       $(if $(filter $(NIXOPS_DEPLOYMENT),$(deployment)),,\
-       nixops create \
-        $(NIXOPS_CREATE) \
-        install/logical.nix \
-        install/physical.nix)
-modify: $(NIXOPS_STATE)
-       nixops modify \
-        $(NIXOPS_MODIFY) \
-        install/logical.nix \
-        install/physical.nix
-
-$(dir $(NIXOPS_STATE)):
-       mkdir -p $@
-
-deployment = $(shell \
-       test ! -f $(NIXOPS_STATE) || \
-       sqlite3 $(NIXOPS_STATE) \
-         "select value from DeploymentAttrs \
-          where name='name' and value='$(NIXOPS_DEPLOYMENT)';")
-
-#
-## deploy
-###
-deploy: create
-       time nixops deploy $(NIXOPS_OPTS) $(NIXOPS_DEPLOY)
-       #TMPDIR=/tmp \
-       #time disnixos-env --use-nixops \
-       # -s install/disnix/services.nix \
-       # -d install/disnix/distribution.nix \
-       # -n install/logical.nix \
-       # -n install/physical.nix
-%/offline: NIX_BUILD+=--option substituters ""
-%/offline: NIXOPS_DEPLOY+=--option substituters ""
-%/offline: %
-       
-
-stop:
-       nixops stop
-
-#
-## state
-###
-state: $(NIXOPS_STATE)
-       sqlite3 $(NIXOPS_STATE) .dump
-
-privateIpv4:
-       sqlite3 $(NIXOPS_STATE) \
-        'update ResourceAttrs set value = "$(IPv4)" where name="privateIpv4"'
+tunnel-rspamd:
+       ssh -nNTL 11334:localhost:11334 root@sourcephile.fr