google-compute-config: sync with upstream units
With local-fs.target part of sysinit.target (https://github.com/NixOS/nixpkgs/pull/61321), we don't need to add it explicitly to certain units anymore, and can change dependencies like they are in other distros (I picked from Google's official CentOS 7 image here). Like them, use StandardOutput=journal+console to pipe google-*.service output to the serial console as well.
This commit is contained in:
parent
a811437e6e
commit
106a1fe265
@ -69,86 +69,79 @@ in
|
|||||||
# GC has 1460 MTU
|
# GC has 1460 MTU
|
||||||
networking.interfaces.eth0.mtu = 1460;
|
networking.interfaces.eth0.mtu = 1460;
|
||||||
|
|
||||||
systemd.services.google-clock-skew-daemon = {
|
|
||||||
description = "Google Compute Engine Clock Skew Daemon";
|
|
||||||
after = [
|
|
||||||
"network.target"
|
|
||||||
"google-instance-setup.service"
|
|
||||||
"google-network-setup.service"
|
|
||||||
];
|
|
||||||
requires = ["network.target"];
|
|
||||||
wantedBy = ["multi-user.target"];
|
|
||||||
serviceConfig = {
|
|
||||||
Type = "simple";
|
|
||||||
ExecStart = "${gce}/bin/google_clock_skew_daemon --debug";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
systemd.services.google-instance-setup = {
|
systemd.services.google-instance-setup = {
|
||||||
description = "Google Compute Engine Instance Setup";
|
description = "Google Compute Engine Instance Setup";
|
||||||
after = ["local-fs.target" "network-online.target" "network.target" "rsyslog.service"];
|
after = [ "network-online.target" "network.target" "rsyslog.service" ];
|
||||||
before = [ "sshd.service" ];
|
before = [ "sshd.service" ];
|
||||||
wants = ["local-fs.target" "network-online.target" "network.target"];
|
|
||||||
wantedBy = [ "sshd.service" "multi-user.target" ];
|
|
||||||
path = with pkgs; [ ethtool openssh ];
|
path = with pkgs; [ ethtool openssh ];
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
ExecStart = "${gce}/bin/google_instance_setup --debug";
|
ExecStart = "${gce}/bin/google_instance_setup";
|
||||||
|
StandardOutput="journal+console";
|
||||||
Type = "oneshot";
|
Type = "oneshot";
|
||||||
};
|
};
|
||||||
|
wantedBy = [ "sshd.service" "multi-user.target" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
systemd.services.google-network-daemon = {
|
systemd.services.google-network-daemon = {
|
||||||
description = "Google Compute Engine Network Daemon";
|
description = "Google Compute Engine Network Daemon";
|
||||||
after = ["local-fs.target" "network-online.target" "network.target" "rsyslog.service" "google-instance-setup.service"];
|
after = [ "network-online.target" "network.target" "google-instance-setup.service" ];
|
||||||
wants = ["local-fs.target" "network-online.target" "network.target"];
|
|
||||||
requires = ["network.target"];
|
|
||||||
partOf = ["network.target"];
|
|
||||||
wantedBy = [ "multi-user.target" ];
|
|
||||||
path = with pkgs; [ iproute ];
|
path = with pkgs; [ iproute ];
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
ExecStart = "${gce}/bin/google_network_daemon --debug";
|
ExecStart = "${gce}/bin/google_network_daemon";
|
||||||
|
StandardOutput="journal+console";
|
||||||
|
Type="simple";
|
||||||
};
|
};
|
||||||
|
wantedBy = [ "multi-user.target" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
systemd.services.google-clock-skew-daemon = {
|
||||||
|
description = "Google Compute Engine Clock Skew Daemon";
|
||||||
|
after = [ "network.target" "google-instance-setup.service" "google-network-daemon.service" ];
|
||||||
|
serviceConfig = {
|
||||||
|
ExecStart = "${gce}/bin/google_clock_skew_daemon";
|
||||||
|
StandardOutput="journal+console";
|
||||||
|
Type = "simple";
|
||||||
|
};
|
||||||
|
wantedBy = ["multi-user.target"];
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
systemd.services.google-shutdown-scripts = {
|
systemd.services.google-shutdown-scripts = {
|
||||||
description = "Google Compute Engine Shutdown Scripts";
|
description = "Google Compute Engine Shutdown Scripts";
|
||||||
after = [
|
after = [
|
||||||
"local-fs.target"
|
|
||||||
"network-online.target"
|
"network-online.target"
|
||||||
"network.target"
|
"network.target"
|
||||||
"rsyslog.service"
|
"rsyslog.service"
|
||||||
"systemd-resolved.service"
|
|
||||||
"google-instance-setup.service"
|
"google-instance-setup.service"
|
||||||
"google-network-daemon.service"
|
"google-network-daemon.service"
|
||||||
];
|
];
|
||||||
wants = [ "local-fs.target" "network-online.target" "network.target"];
|
|
||||||
wantedBy = [ "multi-user.target" ];
|
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
ExecStart = "${pkgs.coreutils}/bin/true";
|
ExecStart = "${pkgs.coreutils}/bin/true";
|
||||||
ExecStop = "${gce}/bin/google_metadata_script_runner --debug --script-type shutdown";
|
ExecStop = "${gce}/bin/google_metadata_script_runner --script-type shutdown";
|
||||||
Type = "oneshot";
|
|
||||||
RemainAfterExit = true;
|
RemainAfterExit = true;
|
||||||
TimeoutStopSec = "infinity";
|
StandardOutput="journal+console";
|
||||||
|
TimeoutStopSec = "0";
|
||||||
|
Type = "oneshot";
|
||||||
};
|
};
|
||||||
|
wantedBy = [ "multi-user.target" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
systemd.services.google-startup-scripts = {
|
systemd.services.google-startup-scripts = {
|
||||||
description = "Google Compute Engine Startup Scripts";
|
description = "Google Compute Engine Startup Scripts";
|
||||||
after = [
|
after = [
|
||||||
"local-fs.target"
|
|
||||||
"network-online.target"
|
"network-online.target"
|
||||||
"network.target"
|
"network.target"
|
||||||
"rsyslog.service"
|
"rsyslog.service"
|
||||||
"google-instance-setup.service"
|
"google-instance-setup.service"
|
||||||
"google-network-daemon.service"
|
"google-network-daemon.service"
|
||||||
];
|
];
|
||||||
wants = ["local-fs.target" "network-online.target" "network.target"];
|
|
||||||
wantedBy = [ "multi-user.target" ];
|
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
ExecStart = "${gce}/bin/google_metadata_script_runner --debug --script-type startup";
|
ExecStart = "${gce}/bin/google_metadata_script_runner --script-type startup";
|
||||||
KillMode = "process";
|
KillMode = "process";
|
||||||
|
StandardOutput = "journal+console";
|
||||||
Type = "oneshot";
|
Type = "oneshot";
|
||||||
};
|
};
|
||||||
|
wantedBy = [ "multi-user.target" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user