summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile11
-rw-r--r--mv/1systems/stro.nix1
-rw-r--r--tv/1systems/nomic.nix2
-rw-r--r--tv/1systems/wu.nix3
-rw-r--r--tv/1systems/xu.nix3
-rw-r--r--tv/2configs/default.nix1
-rw-r--r--tv/2configs/exim-smarthost.nix3
-rw-r--r--tv/2configs/nginx/default.nix17
-rw-r--r--tv/2configs/nginx/public_html.nix (renamed from tv/2configs/nginx-public_html.nix)0
9 files changed, 34 insertions, 7 deletions
diff --git a/Makefile b/Makefile
index 12a60a9..226c0f2 100644
--- a/Makefile
+++ b/Makefile
@@ -1,5 +1,12 @@
stockholm ?= .
+export STOCKHOLM_VERSION ?= $(shell \
+ version=git.$$(git describe --always --dirty); \
+ 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
@@ -60,7 +67,8 @@ deploy: ssh ?= ssh
deploy:
$(call execute,populate)
$(ssh) $(target_user)@$(target_host) -p $(target_port) \
- nixos-rebuild switch --show-trace -I $(target_path)
+ env STOCKHOLM_VERSION="$$STOCKHOLM_VERSION" \
+ nixos-rebuild switch --show-trace -I $(target_path)
# usage: make LOGNAME=shared system=wolf eval.config.krebs.build.host.name
eval eval.:;@$(call evaluate,$${expr-eval})
@@ -75,6 +83,7 @@ install:
target_path=/mnt$(target_path) $(call execute,populate)
$(ssh) $(target_user)@$(target_host) -p $(target_port) \
env NIXOS_CONFIG=$(target_path)/nixos-config \
+ STOCKHOLM_VERSION="$$STOCKHOLM_VERSION" \
nixos-install
# usage: make test system=foo [target=bar] [method={eval,build}]
diff --git a/mv/1systems/stro.nix b/mv/1systems/stro.nix
index f251cb0..520bf14 100644
--- a/mv/1systems/stro.nix
+++ b/mv/1systems/stro.nix
@@ -56,7 +56,6 @@ with config.krebs.lib;
netcat
nix-repl
nmap
- nq
p7zip
pass
posix_man_pages
diff --git a/tv/1systems/nomic.nix b/tv/1systems/nomic.nix
index fa9c908..fed67a1 100644
--- a/tv/1systems/nomic.nix
+++ b/tv/1systems/nomic.nix
@@ -12,7 +12,7 @@ with config.krebs.lib;
../2configs/git.nix
../2configs/im.nix
../2configs/mail-client.nix
- ../2configs/nginx-public_html.nix
+ ../2configs/nginx/public_html.nix
../2configs/pulse.nix
../2configs/retiolum.nix
../2configs/wu-binary-cache/client.nix
diff --git a/tv/1systems/wu.nix b/tv/1systems/wu.nix
index 0bf2421..27dd125 100644
--- a/tv/1systems/wu.nix
+++ b/tv/1systems/wu.nix
@@ -13,7 +13,7 @@ with config.krebs.lib;
../2configs/im.nix
../2configs/mail-client.nix
../2configs/man.nix
- ../2configs/nginx-public_html.nix
+ ../2configs/nginx/public_html.nix
../2configs/pulse.nix
../2configs/retiolum.nix
../2configs/wu-binary-cache
@@ -46,7 +46,6 @@ with config.krebs.lib;
netcat
nix-repl
nmap
- nq
p7zip
push
qrencode
diff --git a/tv/1systems/xu.nix b/tv/1systems/xu.nix
index 46fb59f..96a0545 100644
--- a/tv/1systems/xu.nix
+++ b/tv/1systems/xu.nix
@@ -12,7 +12,7 @@ with config.krebs.lib;
../2configs/git.nix
../2configs/mail-client.nix
../2configs/man.nix
- ../2configs/nginx-public_html.nix
+ ../2configs/nginx/public_html.nix
../2configs/pulse.nix
../2configs/retiolum.nix
../2configs/wu-binary-cache/client.nix
@@ -58,7 +58,6 @@ with config.krebs.lib;
netcat
nix-repl
nmap
- nq
p7zip
pass
qrencode
diff --git a/tv/2configs/default.nix b/tv/2configs/default.nix
index 0a3e40a..df5d5da 100644
--- a/tv/2configs/default.nix
+++ b/tv/2configs/default.nix
@@ -26,6 +26,7 @@ with config.krebs.lib;
imports = [
<secrets>
./backup.nix
+ ./nginx
./vim.nix
{
# stockholm dependencies
diff --git a/tv/2configs/exim-smarthost.nix b/tv/2configs/exim-smarthost.nix
index 3ea0105..280d857 100644
--- a/tv/2configs/exim-smarthost.nix
+++ b/tv/2configs/exim-smarthost.nix
@@ -5,6 +5,9 @@ with config.krebs.lib;
{
krebs.exim-smarthost = {
enable = true;
+ dkim = [
+ { domain = "viljetic.de"; }
+ ];
sender_domains = [
"krebsco.de"
"shackspace.de"
diff --git a/tv/2configs/nginx/default.nix b/tv/2configs/nginx/default.nix
new file mode 100644
index 0000000..1fac65a
--- /dev/null
+++ b/tv/2configs/nginx/default.nix
@@ -0,0 +1,17 @@
+{ config, lib, ... }:
+
+with config.krebs.lib;
+
+{
+ krebs.nginx = {
+ servers.default.locations = [
+ (nameValuePair "= /etc/os-release" ''
+ default_type text/plain;
+ alias /etc/os-release;
+ '')
+ ];
+ };
+ tv.iptables = optionalAttrs config.krebs.nginx.enable {
+ input-retiolum-accept-new-tcp = singleton "http";
+ };
+}
diff --git a/tv/2configs/nginx-public_html.nix b/tv/2configs/nginx/public_html.nix
index 15a3b54..15a3b54 100644
--- a/tv/2configs/nginx-public_html.nix
+++ b/tv/2configs/nginx/public_html.nix