summaryrefslogtreecommitdiff
path: root/Biz/Devalloc.nix
diff options
context:
space:
mode:
Diffstat (limited to 'Biz/Devalloc.nix')
-rw-r--r--Biz/Devalloc.nix16
1 files changed, 16 insertions, 0 deletions
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";