mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-23 23:43:30 +00:00
nixos/k3s: Update service to match upstream
Fixes race between k3s and network.
This commit is contained in:
parent
9ed8e03a09
commit
7514f00733
@ -78,7 +78,8 @@ in
|
||||
|
||||
systemd.services.k3s = {
|
||||
description = "k3s service";
|
||||
after = mkIf cfg.docker [ "docker.service" ];
|
||||
after = if cfg.docker then "docker.service" else "network-online.service";
|
||||
wants = "network-online.service";
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
serviceConfig = {
|
||||
# See: https://github.com/rancher/k3s/blob/dddbd16305284ae4bd14c0aade892412310d7edc/install.sh#L197
|
||||
@ -87,6 +88,10 @@ in
|
||||
Delegate = "yes";
|
||||
Restart = "always";
|
||||
RestartSec = "5s";
|
||||
LimitNOFILE = 1048576;
|
||||
LimitNPROC = "infinity";
|
||||
LimitCORE = "infinity";
|
||||
TasksMax = "infinity";
|
||||
ExecStart = concatStringsSep " \\\n " (
|
||||
[
|
||||
"${cfg.package}/bin/k3s ${cfg.role}"
|
||||
|
Loading…
Reference in New Issue
Block a user