summary refs log tree commit diff
diff options
context:
space:
mode:
authorFalco Peijnenburg <fpeijnenburg@gmail.com>2017-07-17 15:40:33 +0200
committerRobin Gloster <mail@glob.in>2017-07-17 20:17:58 +0200
commitb09d036342d59af60fb5d6ac51296e07961818d9 (patch)
tree2f094a4727262fbd318b9290c528616a321dd200
parentc4783a982b3dc45d0e9571d163ade0581788fbbd (diff)
downloadnixpkgs-b09d036342d59af60fb5d6ac51296e07961818d9.tar
nixpkgs-b09d036342d59af60fb5d6ac51296e07961818d9.tar.gz
nixpkgs-b09d036342d59af60fb5d6ac51296e07961818d9.tar.bz2
nixpkgs-b09d036342d59af60fb5d6ac51296e07961818d9.tar.lz
nixpkgs-b09d036342d59af60fb5d6ac51296e07961818d9.tar.xz
nixpkgs-b09d036342d59af60fb5d6ac51296e07961818d9.tar.zst
nixpkgs-b09d036342d59af60fb5d6ac51296e07961818d9.zip
Strongswan after network-online instead of network
The systemd service file shipped with strongswan has strongswan started after `network-online`. It turns out that this is for good reason: failure to connect on boot otherwise. 

See this thread on the mailing list, which my colleague initiated after finding that our NixOS strongswan config wouldn't connect on boot:
https://lists.strongswan.org/pipermail/users/2017-January/010359.html

Tested on a local config (which has the strongswan service config overridden).
-rw-r--r--nixos/modules/services/networking/strongswan.nix2
1 files changed, 1 insertions, 1 deletions
diff --git a/nixos/modules/services/networking/strongswan.nix b/nixos/modules/services/networking/strongswan.nix
index 8778b0364f9..b0eb0460b9b 100644
--- a/nixos/modules/services/networking/strongswan.nix
+++ b/nixos/modules/services/networking/strongswan.nix
@@ -120,7 +120,7 @@ in
       wantedBy = [ "multi-user.target" ];
       path = with pkgs; [ kmod iproute iptables utillinux ]; # XXX Linux
       wants = [ "keys.target" ];
-      after = [ "network.target" "keys.target" ];
+      after = [ "network-online.target" "keys.target" ];
       environment = {
         STRONGSWAN_CONF = strongswanConf { inherit setup connections ca secrets; };
       };