diff options
author | zimbatm <zimbatm@zimbatm.com> | 2019-05-20 14:06:12 +0200 |
---|---|---|
committer | zimbatm <zimbatm@zimbatm.com> | 2020-01-21 13:14:38 +0100 |
commit | b54c60b68951bd137d6a581da0000121b9e7d121 (patch) | |
tree | 0a6d9b9ca990dcbd5f4cceab47238766653523e2 /nixos | |
parent | 71c19d3efaa28a226134594d170c6dec79f1d908 (diff) | |
download | nixpkgs-b54c60b68951bd137d6a581da0000121b9e7d121.tar nixpkgs-b54c60b68951bd137d6a581da0000121b9e7d121.tar.gz nixpkgs-b54c60b68951bd137d6a581da0000121b9e7d121.tar.bz2 nixpkgs-b54c60b68951bd137d6a581da0000121b9e7d121.tar.lz nixpkgs-b54c60b68951bd137d6a581da0000121b9e7d121.tar.xz nixpkgs-b54c60b68951bd137d6a581da0000121b9e7d121.tar.zst nixpkgs-b54c60b68951bd137d6a581da0000121b9e7d121.zip |
nixos/zerotierone: simplify the unit
There is no need to stop/start the unit when the machine is online or offline. This should fix the shutdown locking issues. nixos zerotier: sometimes it doesn't shutdown
Diffstat (limited to 'nixos')
-rw-r--r-- | nixos/modules/services/networking/zerotierone.nix | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/nixos/modules/services/networking/zerotierone.nix b/nixos/modules/services/networking/zerotierone.nix index 764af3846fe..069e15a909b 100644 --- a/nixos/modules/services/networking/zerotierone.nix +++ b/nixos/modules/services/networking/zerotierone.nix @@ -38,10 +38,13 @@ in config = mkIf cfg.enable { systemd.services.zerotierone = { description = "ZeroTierOne"; - path = [ cfg.package ]; - bindsTo = [ "network-online.target" ]; - after = [ "network-online.target" ]; + wantedBy = [ "multi-user.target" ]; + after = [ "network.target" ]; + wants = [ "network-online.target" ]; + + path = [ cfg.package ]; + preStart = '' mkdir -p /var/lib/zerotier-one/networks.d chmod 700 /var/lib/zerotier-one @@ -53,6 +56,7 @@ in ExecStart = "${cfg.package}/bin/zerotier-one -p${toString cfg.port}"; Restart = "always"; KillMode = "process"; + TimeoutStopSec = 5; }; }; |