nixos/tests/systemd-timesyncd: replace activationScript via tmpfiles

nikstur 339a866b 6987ff3a

Changed files
+7 -6
nixos
+7 -6
nixos/tests/systemd-timesyncd.nix
···
# create the path that should be migrated by our activation script when
# upgrading to a newer nixos version
system.stateVersion = "19.03";
-
system.activationScripts.simulate-old-timesync-state-dir = lib.mkBefore ''
-
rm -f /var/lib/systemd/timesync
-
mkdir -p /var/lib/systemd /var/lib/private/systemd/timesync
-
ln -s /var/lib/private/systemd/timesync /var/lib/systemd/timesync
-
chown systemd-timesync: /var/lib/private/systemd/timesync
-
'';
});
};
···
# create the path that should be migrated by our activation script when
# upgrading to a newer nixos version
system.stateVersion = "19.03";
+
systemd.tmpfiles.rules = [
+
"r /var/lib/systemd/timesync -"
+
"d /var/lib/systemd -"
+
"d /var/lib/private/systemd/timesync -"
+
"L /var/lib/systemd/timesync - - - - /var/lib/private/systemd/timesync"
+
"d /var/lib/private/systemd/timesync - systemd-timesync systemd-timesync -"
+
];
});
};