summaryrefslogtreecommitdiffstats
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
commitdb871a25232c59d7ff6046f59210bb27f97738e4 (patch)
tree09c31b9410685215832e245128df3c278bb39871
parent2cf39dc71fbd6e02f582f03187e783e3e5685497 (diff)
parentcd8ed3292a844674d12b419b34915562da0beb75 (diff)
Merge branch 'master' of gum:stockholm-bare
-rw-r--r--Makefile9
1 files changed, 5 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index 226c0f2..7252ca7 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