nixos/initrd-ssh: ensure correct ordering w.r.t. shutdown.target

This commit is contained in:
Philip Taron 2023-11-30 15:12:10 -08:00
parent e4136ed6dd
commit 0db4d5b335
No known key found for this signature in database

View File

@ -243,8 +243,10 @@ in
services.sshd = {
description = "SSH Daemon";
wantedBy = ["initrd.target"];
after = ["network.target" "initrd-nixos-copy-secrets.service"];
wantedBy = [ "initrd.target" ];
after = [ "network.target" "initrd-nixos-copy-secrets.service" ];
before = [ "shutdown.target" ];
conflicts = [ "shutdown.target" ];
# Keys from Nix store are world-readable, which sshd doesn't
# like. If this were a real nix store and not the initrd, we