mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-10-03 13:30:36 +00:00
nixos/*: Fix some pkgs.systemd references (#547726)
This commit is contained in:
@@ -87,12 +87,6 @@ let
|
||||
"network.target"
|
||||
];
|
||||
|
||||
# We wait for the udev events queue to empty in the *hope* that the
|
||||
# devices needed here become available. This is terribly broken and
|
||||
# essentially no better than a random sleep().
|
||||
# FIXME: use .device units dependecies instead.
|
||||
serviceConfig.ExecStartPre = "-${lib.getExe' pkgs.systemd "udevadm"} settle --timeout=180";
|
||||
|
||||
unitConfig = {
|
||||
# Avoid default dependencies like "basic.target", which prevents ifstate from starting before luks is unlocked.
|
||||
DefaultDependencies = "no";
|
||||
@@ -193,6 +187,13 @@ in
|
||||
ExecStart = "${lib.getExe cfg.package} --config ${
|
||||
config.environment.etc."ifstate/ifstate.yaml".source
|
||||
} apply";
|
||||
|
||||
# We wait for the udev events queue to empty in the *hope* that the
|
||||
# devices needed here become available. This is terribly broken and
|
||||
# essentially no better than a random sleep(). Same below for initrd.
|
||||
# FIXME: use .device units dependecies instead.
|
||||
ExecStartPre = "-${lib.getExe' config.systemd.package "udevadm"} settle --timeout=180";
|
||||
|
||||
# because oneshot services do not have a timeout by default
|
||||
TimeoutStartSec = "2min";
|
||||
};
|
||||
@@ -294,6 +295,8 @@ in
|
||||
} apply";
|
||||
# because oneshot services do not have a timeout by default
|
||||
TimeoutStartSec = "2min";
|
||||
# See comment on non-initrd service above
|
||||
ExecStartPre = "-${lib.getExe' config.boot.initrd.systemd.package "udevadm"} settle --timeout=180";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
@@ -43,10 +43,15 @@ pkgs.lib.listToAttrs (
|
||||
meta = { };
|
||||
|
||||
nodes.machine =
|
||||
{ pkgs, lib, ... }:
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
let
|
||||
script = ''
|
||||
${lib.getExe' pkgs.systemd "udevadm"} settle --timeout=180
|
||||
${lib.getExe' config.boot.initrd.systemd.package "udevadm"} settle --timeout=180
|
||||
ip link
|
||||
if ${lib.optionalString predictable "!"} ip link show eth0; then
|
||||
echo Success
|
||||
|
||||
Reference in New Issue
Block a user