From 5bfe944907b0afcc979e4db7058cbfd884fd029b Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Mon, 5 May 2014 16:23:38 +0200 Subject: [PATCH] Don't run hwclock if /dev/rtc doesn't exist E.g. on EC2 instances. Backport: 14.04 --- nixos/modules/system/boot/shutdown.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nixos/modules/system/boot/shutdown.nix b/nixos/modules/system/boot/shutdown.nix index 68bc936c5b0..11041066e07 100644 --- a/nixos/modules/system/boot/shutdown.nix +++ b/nixos/modules/system/boot/shutdown.nix @@ -13,7 +13,7 @@ with lib; unitConfig = { DefaultDependencies = false; - ConditionVirtualization = "!systemd-nspawn"; + ConditionPathExists = "/dev/rtc"; }; serviceConfig = {