summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authormakefu <github@syntax-fehler.de>2016-03-11 08:52:58 +0100
committermakefu <github@syntax-fehler.de>2016-03-11 08:52:58 +0100
commit1219465af903c2a6898daf8ed359f5ccf189810b (patch)
tree0bb6f478b51d13e14e7b1c189e6c0d3e1c0a0c7a /Makefile
parentce98c6d7a3980e1e81e4ecceaec12d29cd25eb36 (diff)
parent8629a9de8bcc98686d10387c02489178183b616d (diff)
Merge branch 'master' of gum:stockholm-bare
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile9
1 files changed, 5 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index 226c0f297..7252ca70e 100644
--- a/Makefile
+++ b/Makefile
@@ -1,16 +1,17 @@
stockholm ?= .
+export HOSTNAME ?= $(shell cat /proc/sys/kernel/hostname)
+
export STOCKHOLM_VERSION ?= $(shell \
version=git.$$(git describe --always --dirty); \
- case $$version in (*-dirty) version=$$version@$$(hostname); esac; \
+ case $$version in (*-dirty) version=$$version@$$HOSTNAME; esac; \
date=$$(date +%y.%m); \
printf '%s' "$$date.$$version"; \
)
-ifndef nixos-config
$(if $(system),,$(error unbound variable: system))
-nixos-config = ./$(LOGNAME)/1systems/$(system).nix
-endif
+
+nixos-config ?= $(stockholm)/$(LOGNAME)/1systems/$(system).nix
# target = [target_user@]target_host[:target_port][/target_path]
ifdef target