From 5f7dfe0b58e961d4f798691e6067d61e44460470 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Thu, 9 Mar 2017 22:08:24 +0100 Subject: Poke thermoprint config --- bragi.nix | 9 ++------- bragi/thermoprint-server/thermoprint-server.hs | 2 +- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/bragi.nix b/bragi.nix index 3fc941cc..987a83d6 100644 --- a/bragi.nix +++ b/bragi.nix @@ -270,14 +270,9 @@ in rec { home = "/var/lib/thermoprint"; }; - environment.etc."thermoprint-server" = { - source = ./bragi/thermoprint-server; - mode = "symlink"; - }; - systemd.services."thermoprint" = { environment = { - THERMOPRINT_CONFIG = "/etc/thermoprint-server"; + THERMOPRINT_CONFIG = ./bragi/thermoprint-server; THERMOPRINT_CACHE = ''${users.extraUsers."thermoprint".home}/dyre''; }; requires = [ "postgresql.service" ]; @@ -344,7 +339,7 @@ in rec { server_name _; location /thermoprint/api/ { - proxy_pass http://localhost:8080/; + proxy_pass http://::1:8080/; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; diff --git a/bragi/thermoprint-server/thermoprint-server.hs b/bragi/thermoprint-server/thermoprint-server.hs index 7e571021..4635dd0a 100644 --- a/bragi/thermoprint-server/thermoprint-server.hs +++ b/bragi/thermoprint-server/thermoprint-server.hs @@ -41,5 +41,5 @@ main = thermoprintServer True (Nat runDb) $ configure <$> def `withPrinters` pri } warpSettings = Warp.defaultSettings - & Warp.setHost "localhost" + & Warp.setHost "::1" & Warp.setPort 8080 -- cgit v1.2.3