about summary refs log tree commit diff
path: root/nixos/modules/services/networking/cjdns.nix
diff options
context:
space:
mode:
authorSophie Taylor <sophie@traumapony.org>2016-11-05 18:10:09 +1000
committerGraham Christensen <graham@grahamc.com>2016-11-27 22:07:51 -0500
commit016fa06c71c86c1e43ad8df91dae76d8ac9d7ab3 (patch)
treed2f552cbe3a2ee673af61678ddf546c8769ab2eb /nixos/modules/services/networking/cjdns.nix
parent880d616ec007df10454b87593062711c39da9f7d (diff)
downloadnixlib-016fa06c71c86c1e43ad8df91dae76d8ac9d7ab3.tar
nixlib-016fa06c71c86c1e43ad8df91dae76d8ac9d7ab3.tar.gz
nixlib-016fa06c71c86c1e43ad8df91dae76d8ac9d7ab3.tar.bz2
nixlib-016fa06c71c86c1e43ad8df91dae76d8ac9d7ab3.tar.lz
nixlib-016fa06c71c86c1e43ad8df91dae76d8ac9d7ab3.tar.xz
nixlib-016fa06c71c86c1e43ad8df91dae76d8ac9d7ab3.tar.zst
nixlib-016fa06c71c86c1e43ad8df91dae76d8ac9d7ab3.zip
cjdns: Improving systemd unit description
Diffstat (limited to 'nixos/modules/services/networking/cjdns.nix')
-rw-r--r--nixos/modules/services/networking/cjdns.nix9
1 files changed, 6 insertions, 3 deletions
diff --git a/nixos/modules/services/networking/cjdns.nix b/nixos/modules/services/networking/cjdns.nix
index f50dae2ab7be..0dd028997f46 100644
--- a/nixos/modules/services/networking/cjdns.nix
+++ b/nixos/modules/services/networking/cjdns.nix
@@ -198,8 +198,9 @@ in
 
     systemd.services.cjdns = {
       description = "cjdns: routing engine designed for security, scalability, speed and ease of use";
-      wantedBy = [ "multi-user.target" ];
-      after = [ "network.target" ];
+      wantedBy = [ "multi-user.target" "sleep.target"];
+      after = [ "network-online.target" ];
+      bindsTo = [ "network-online.target" ];
 
       preStart = if cfg.confFile != null then "" else ''
         [ -e /etc/cjdns.keys ] && source /etc/cjdns.keys
@@ -235,7 +236,9 @@ in
 
       serviceConfig = {
         Type = "forking";
-        Restart = "on-failure";
+        Restart = "always";
+        StartLimitInterval = 0;
+        RestartSec = 1;
         CapabilityBoundingSet = "CAP_NET_ADMIN CAP_NET_RAW";
         AmbientCapabilities = "CAP_NET_ADMIN CAP_NET_RAW";
         ProtectSystem = "full";