Merge pull request #67394 from Ma27/drop-keys.target-dependency

nixos/treewide: drop dependencies to `keys.target`
This commit is contained in:
Linus Heckemann 2019-08-28 12:01:22 +02:00 committed by GitHub
commit 5e2f89bbce
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 26 additions and 13 deletions

View File

@ -291,6 +291,26 @@
configuration while being better type-checked and mergeable.
</para>
</listitem>
<listitem>
<para>
No service depends on <literal>keys.target</literal> anymore which is a systemd
target that indicates if all <link xlink:href="https://nixos.org/nixops/manual/#idm140737322342384">NixOps keys</link> were successfully uploaded.
Instead, <literal>&lt;key-name&gt;-key.service</literal> should be used to define
a dependency of a key in a service. The full issue behind the <literal>keys.target</literal>
dependency is described at <link xlink:href="https://github.com/NixOS/nixpkgs/issues/67265">NixOS/nixpkgs#67265</link>.
</para>
<para>
The following services are affected by this:
<itemizedlist>
<listitem><para><link linkend="opt-services.dovecot2.enable"><literal>services.dovecot2</literal></link></para></listitem>
<listitem><para><link linkend="opt-services.nsd.enable"><literal>services.nsd</literal></link></para></listitem>
<listitem><para><link linkend="opt-services.softether.enable"><literal>services.softether</literal></link></para></listitem>
<listitem><para><link linkend="opt-services.strongswan.enable"><literal>services.strongswan</literal></link></para></listitem>
<listitem><para><link linkend="opt-services.strongswan-swanctl.enable"><literal>services.strongswan-swanctl</literal></link></para></listitem>
<listitem><para><link linkend="opt-services.httpd.enable"><literal>services.httpd</literal></link></para></listitem>
</itemizedlist>
</para>
</listitem>
</itemizedlist>
</section>

View File

@ -344,8 +344,7 @@ in
systemd.services.dovecot2 = {
description = "Dovecot IMAP/POP3 server";
after = [ "keys.target" "network.target" ];
wants = [ "keys.target" ];
after = [ "network.target" ];
wantedBy = [ "multi-user.target" ];
restartTriggers = [ cfg.configFile ];

View File

@ -916,9 +916,8 @@ in
systemd.services.nsd = {
description = "NSD authoritative only domain name service";
after = [ "keys.target" "network.target" ];
after = [ "network.target" ];
wantedBy = [ "multi-user.target" ];
wants = [ "keys.target" ];
serviceConfig = {
ExecStart = "${nsdPkg}/sbin/nsd -d -c ${nsdEnv}/nsd.conf";

View File

@ -70,8 +70,6 @@ in
systemd.services."softether-init" = {
description = "SoftEther VPN services initial task";
after = [ "keys.target" ];
wants = [ "keys.target" ];
wantedBy = [ "network.target" ];
serviceConfig = {
Type = "oneshot";

View File

@ -62,8 +62,7 @@ in {
systemd.services.strongswan-swanctl = {
description = "strongSwan IPsec IKEv1/IKEv2 daemon using swanctl";
wantedBy = [ "multi-user.target" ];
after = [ "network-online.target" "keys.target" ];
wants = [ "keys.target" ];
after = [ "network-online.target" ];
path = with pkgs; [ kmod iproute iptables utillinux ];
environment = {
STRONGSWAN_CONF = pkgs.writeTextFile {

View File

@ -151,8 +151,7 @@ in
description = "strongSwan IPSec Service";
wantedBy = [ "multi-user.target" ];
path = with pkgs; [ kmod iproute iptables utillinux ]; # XXX Linux
wants = [ "keys.target" ];
after = [ "network-online.target" "keys.target" ];
after = [ "network-online.target" ];
environment = {
STRONGSWAN_CONF = strongswanConf { inherit setup connections ca secretsFile managePlugins enabledPlugins; };
};

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 ]