summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorlassulus <lass@aidsballs.de>2016-03-15 14:14:18 +0100
committerlassulus <lass@aidsballs.de>2016-03-15 14:14:18 +0100
commitdb3dd77f6de5964bcaa265bf8e5863d7647932f5 (patch)
treeabaafc1e62f87d887923056470269f3132e76695 /Makefile
parent00eed553e55bd07400f7fd880b6f5c25cd6a7df6 (diff)
parentac5cb4436e1f8056caffda5310bf811a5370cc45 (diff)
Merge remote-tracking branch 'cd/master'
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