summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorAlan Pearce2018-04-29 20:04:48 +0200
committerAlan Pearce2018-04-29 20:04:48 +0200
commit663992bd5a621a40a8f0124369d5ffa821871e19 (patch)
treef30207c25230098b96f9a353afe6f070ecba49a6
parented7e95ef79e2b754047390f93e11733291775cf1 (diff)
downloadnixfiles-663992bd5a621a40a8f0124369d5ffa821871e19.tar.lz
nixfiles-663992bd5a621a40a8f0124369d5ffa821871e19.tar.zst
nixfiles-663992bd5a621a40a8f0124369d5ffa821871e19.zip
SatoshiPay: Startup mongodb and redis automatically, after delay
-rw-r--r--modules/satoshipay.nix16
1 files changed, 16 insertions, 0 deletions
diff --git a/modules/satoshipay.nix b/modules/satoshipay.nix
index d8787ebb..36561b52 100644
--- a/modules/satoshipay.nix
+++ b/modules/satoshipay.nix
@@ -41,10 +41,26 @@
     replSetName = "rs0";
   };
   systemd.services.mongodb.wantedBy = lib.mkForce  [];
+  systemd.timers.mongodb = {
+    description = "Delayed startup of MongoDB";
+    wantedBy = [ "timers.target" ];
+    timerConfig = {
+      OnActiveSec = "1 min";
+    };
+  };
+
   services.redis = {
     enable = true;
   };
   systemd.services.redis.wantedBy = lib.mkForce [];
+  systemd.timers.redis = {
+    description = "Delayed startup of Redis";
+    wantedBy = [ "timers.target" ];
+    timerConfig = {
+      OnActiveSec = "1 min";
+    };
+  };
+
 
   services.printing.drivers = with pkgs; [
     cups-toshiba-estudio