0
0
Fork 0
mirror of https://github.com/NixOS/nixpkgs.git synced 2025-07-14 06:00:33 +03:00

nixos/network-interfaces: ensure correct ordering w.r.t. shutdown.target

Also, mark this service as `oneshot`, since it is.
This commit is contained in:
Philip Taron 2023-11-30 15:39:01 -08:00
parent e95b3d3915
commit 54064109fb
No known key found for this signature in database

View file

@ -1408,9 +1408,11 @@ in
systemd.services.domainname = lib.mkIf (cfg.domain != null) {
wantedBy = [ "sysinit.target" ];
before = [ "sysinit.target" ];
before = [ "sysinit.target" "shutdown.target" ];
conflicts = [ "shutdown.target" ];
unitConfig.DefaultDependencies = false;
serviceConfig.ExecStart = ''${pkgs.nettools}/bin/domainname "${cfg.domain}"'';
serviceConfig.Type = "oneshot";
};
environment.etc.hostid = mkIf (cfg.hostId != null) { source = hostidFile; };