summary refs log tree commit diff
path: root/nixos/modules/virtualisation/amazon-init.nix
diff options
context:
space:
mode:
authorDan Peebles <pumpkin@me.com>2017-02-27 16:51:36 +0000
committerDan Peebles <pumpkin@me.com>2017-02-27 16:51:36 +0000
commit6018cf4a692b5e12e433cc332f8d8f79ccd57ba1 (patch)
tree36b165ad2e40712e7cb8711928998638251ad104 /nixos/modules/virtualisation/amazon-init.nix
parentbccac381b27592bdc22d151c744814716eb4f7ec (diff)
downloadnixpkgs-6018cf4a692b5e12e433cc332f8d8f79ccd57ba1.tar
nixpkgs-6018cf4a692b5e12e433cc332f8d8f79ccd57ba1.tar.gz
nixpkgs-6018cf4a692b5e12e433cc332f8d8f79ccd57ba1.tar.bz2
nixpkgs-6018cf4a692b5e12e433cc332f8d8f79ccd57ba1.tar.lz
nixpkgs-6018cf4a692b5e12e433cc332f8d8f79ccd57ba1.tar.xz
nixpkgs-6018cf4a692b5e12e433cc332f8d8f79ccd57ba1.tar.zst
nixpkgs-6018cf4a692b5e12e433cc332f8d8f79ccd57ba1.zip
amazon-init.service: fix starting services at startup
We now make it happen later in the boot process so that multi-user
has already activated, so as to not run afoul of the logic in
switch-to-configuration.pl. It's not my favorite solution, but at
least it works. Also added a check to the VM test to catch the failure
so we don't break in future.

Fixes #23121
Diffstat (limited to 'nixos/modules/virtualisation/amazon-init.nix')
-rw-r--r--nixos/modules/virtualisation/amazon-init.nix5
1 files changed, 2 insertions, 3 deletions
diff --git a/nixos/modules/virtualisation/amazon-init.nix b/nixos/modules/virtualisation/amazon-init.nix
index 5797d9db436..a7362423eb4 100644
--- a/nixos/modules/virtualisation/amazon-init.nix
+++ b/nixos/modules/virtualisation/amazon-init.nix
@@ -45,9 +45,8 @@ in {
     inherit script;
     description = "Reconfigure the system from EC2 userdata on startup";
 
-    wantedBy = [ "sshd.service" ];
-    before = [ "sshd.service" ];
-    after = [ "network-online.target" ];
+    wantedBy = [ "multi-user.target" ];
+    after = [ "multi-user.target" ];
     requires = [ "network-online.target" ];
  
     restartIfChanged = false;