summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile33
1 files changed, 11 insertions, 22 deletions
diff --git a/Makefile b/Makefile
index d074a3d..de7e4f1 100644
--- a/Makefile
+++ b/Makefile
@@ -1,34 +1,23 @@
-SKIP_SERVICES = []
-all:
- nix-build -A entrypoint \
- --arg baseConfig '(import ./config.nix)' \
- --arg baseSkipServices '${SKIP_SERVICES}'
-
-run: all
- ./result
+CONFIG = ./config.nix
-all.prod:
+entrypoint:
nix-build -A entrypoint \
- --arg baseConfig '(import ./prod.config.nix)' \
- --arg baseSkipServices '${SKIP_SERVICES}'
+ --arg baseConfig '(import ${CONFIG})'
-run.prod: all.prod
+install:
+ nix-build -A install --arg baseConfig '(import ${CONFIG})'
./result
-install.prod:
- nix-build -A install --arg baseConfig '(import ./prod.config.nix)'
- ./result
+test:
+ $$(nix-build --no-out-link -A pkgs.bash)/bin/bash test.sh
+ @if [ $$? == 0 ]; then echo "TESTS PASSED!"; else echo "TESTS FAILED!"; fi
srv.shell:
- nix-shell -A srv.shell --command 'cd srv; return'
-
-srv.shell.prod:
- nix-shell -A srv.shell --arg baseConfig '(import ./prod.config.nix)' --command 'cd srv; return'
-
-static.shell:
- nix-shell -A static.shell --command 'cd static; return'
+ nix-shell -A srv.shell --arg baseConfig '(import ${CONFIG})' \
+ --command 'cd srv; return'
+# TODO static is on the way out, these aren't well supported
static.serve:
nix-shell -A static.shell --run 'cd static; static-serve'