diff options
-rw-r--r-- | bragi.nix | 9 | ||||
-rw-r--r-- | bragi/thermoprint-server/thermoprint-server.hs | 2 |
2 files changed, 3 insertions, 8 deletions
@@ -270,14 +270,9 @@ in rec { | |||
270 | home = "/var/lib/thermoprint"; | 270 | home = "/var/lib/thermoprint"; |
271 | }; | 271 | }; |
272 | 272 | ||
273 | environment.etc."thermoprint-server" = { | ||
274 | source = ./bragi/thermoprint-server; | ||
275 | mode = "symlink"; | ||
276 | }; | ||
277 | |||
278 | systemd.services."thermoprint" = { | 273 | systemd.services."thermoprint" = { |
279 | environment = { | 274 | environment = { |
280 | THERMOPRINT_CONFIG = "/etc/thermoprint-server"; | 275 | THERMOPRINT_CONFIG = ./bragi/thermoprint-server; |
281 | THERMOPRINT_CACHE = ''${users.extraUsers."thermoprint".home}/dyre''; | 276 | THERMOPRINT_CACHE = ''${users.extraUsers."thermoprint".home}/dyre''; |
282 | }; | 277 | }; |
283 | requires = [ "postgresql.service" ]; | 278 | requires = [ "postgresql.service" ]; |
@@ -344,7 +339,7 @@ in rec { | |||
344 | server_name _; | 339 | server_name _; |
345 | 340 | ||
346 | location /thermoprint/api/ { | 341 | location /thermoprint/api/ { |
347 | proxy_pass http://localhost:8080/; | 342 | proxy_pass http://::1:8080/; |
348 | proxy_http_version 1.1; | 343 | proxy_http_version 1.1; |
349 | proxy_set_header Upgrade $http_upgrade; | 344 | proxy_set_header Upgrade $http_upgrade; |
350 | proxy_set_header Connection "upgrade"; | 345 | 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 | |||
41 | } | 41 | } |
42 | 42 | ||
43 | warpSettings = Warp.defaultSettings | 43 | warpSettings = Warp.defaultSettings |
44 | & Warp.setHost "localhost" | 44 | & Warp.setHost "::1" |
45 | & Warp.setPort 8080 | 45 | & Warp.setPort 8080 |