0
0
Fork 0
mirror of https://github.com/NixOS/nixpkgs.git synced 2025-07-13 05:38:57 +03:00

nixos/treewide: drop dependencies to keys.target

The `keys.target` is used to indicate whether all NixOps keys were
successfully uploaded on an unattended reboot. However this can cause
startup issues e.g. with NixOS containers (see #67265) and can block
boots even though this might not be needed (e.g. with a dovecot2
instance running that doesn't need any of the NixOps keys).

As described in the NixOps manual[1], dependencies to keys should be
defined like this now:

``` nix
{
  systemd.services.myservice = {
    after = [ "secret-key.service" ];
    wants = [ "secret-key.service" ];
  };
}
```

However I'd leave the issue open until it's discussed whether or not to
keep `keys.target` in `nixpkgs`.

[1] https://nixos.org/nixops/manual/#idm140737322342384
This commit is contained in:
Maximilian Bosch 2019-08-24 16:52:17 +02:00
parent c09bc3e7e2
commit 56a7bc05e1
No known key found for this signature in database
GPG key ID: 091DBF4D1FC46B8E
7 changed files with 26 additions and 13 deletions

View file

@ -670,8 +670,7 @@ in
{ description = "Apache HTTPD";
wantedBy = [ "multi-user.target" ];
wants = [ "keys.target" ];
after = [ "network.target" "fs.target" "keys.target" ];
after = [ "network.target" "fs.target" ];
path =
[ httpd pkgs.coreutils pkgs.gnugrep ]