From e11131dbcf13c4b33a4321fdead44269f3e088c9 Mon Sep 17 00:00:00 2001 From: Ben Sima Date: Sat, 9 Jan 2021 12:04:42 -0500 Subject: Fix live cookie settings Auth was broken without the xsrf thing disabled. Anyway, its best to have well-defined live and test settings. I will re-enable xsrf when I figure out the js snippet I need. --- Biz/Devalloc.nix | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'Biz/Devalloc.nix') diff --git a/Biz/Devalloc.nix b/Biz/Devalloc.nix index b7c7503..40b06c4 100644 --- a/Biz/Devalloc.nix +++ b/Biz/Devalloc.nix @@ -19,6 +19,16 @@ in incoming HTTP traffic. ''; }; + keep = lib.mkOption { + type = lib.types.path; + default = "/var/devalloc/keep"; + description = "Keep location"; + }; + depo = lib.mkOption { + type = lib.types.path; + default = "/var/devalloc/depo"; + description = "depo location"; + }; package = lib.mkOption { type = lib.types.package; description = "devalloc package to use"; @@ -28,6 +38,10 @@ in systemd.services.devalloc = { path = [ cfg.package pkgs.git ]; wantedBy = [ "multi-user.target" ]; + preStart = '' + mkdir -p ${cfg.keep} + mkdir -p ${cfg.depo} + ''; script = '' ${cfg.package}/bin/devalloc ''; @@ -38,6 +52,8 @@ in Environment = [ "PORT=${toString cfg.port}" "AREA=Live" + "DEPO=${cfg.depo}" + "KEEP=${cfg.keep}" ]; EnvironmentFile="/run/devalloc/env"; KillSignal = "INT"; -- cgit v1.2.3