diff --git a/install.sh b/install.sh index 2fc73a2..a684a7d 100755 --- a/install.sh +++ b/install.sh @@ -3,7 +3,7 @@ # ---- Clone the config repo ---- cd /root -git clone 'https://gitea.20111511.xyz/h3lp/autodeploy.git' +git clone 'https://gitea.20111511.xyz/h3lp/autodeploy.git' --branch cavemen cd autodeploy diff --git a/root/etc/nixos/configuration.nix b/root/etc/nixos/configuration.nix index d430692..655b31b 100644 --- a/root/etc/nixos/configuration.nix +++ b/root/etc/nixos/configuration.nix @@ -153,9 +153,9 @@ systemd.services.minecraft-setup = { description = "Minecraft Server Initial Setup"; wantedBy = [ "multi-user.target" ]; - after = [ "network.target" "minecraft-setup.service" ]; # wait for setup - requires = [ "minecraft-setup.service" ]; # and fail if setup fails - + after = [ "network-online.target" ]; + wants = [ "network-online.target" ]; + # Only run if setup hasn't been completed yet unitConfig.ConditionPathExists = "!/home/h3lp/mineserver/.setup-done"; @@ -202,7 +202,8 @@ systemd.services.minecraft = { description = "Minecraft Server"; wantedBy = [ "multi-user.target" ]; - after = [ "network.target" ]; + after = [ "network.target" "minecraft-setup.service" ]; # wait for setup + requires = [ "minecraft-setup.service" ]; # and fail if setup fails serviceConfig = { Type = "forking";