Skip to content

Commit 339a866

Browse files
committed
nixos/tests/systemd-timesyncd: replace activationScript via tmpfiles
1 parent 6987ff3 commit 339a866

1 file changed

Lines changed: 7 additions & 6 deletions

File tree

nixos/tests/systemd-timesyncd.nix

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,13 @@ in {
1515
# create the path that should be migrated by our activation script when
1616
# upgrading to a newer nixos version
1717
system.stateVersion = "19.03";
18-
system.activationScripts.simulate-old-timesync-state-dir = lib.mkBefore ''
19-
rm -f /var/lib/systemd/timesync
20-
mkdir -p /var/lib/systemd /var/lib/private/systemd/timesync
21-
ln -s /var/lib/private/systemd/timesync /var/lib/systemd/timesync
22-
chown systemd-timesync: /var/lib/private/systemd/timesync
23-
'';
18+
systemd.tmpfiles.rules = [
19+
"r /var/lib/systemd/timesync -"
20+
"d /var/lib/systemd -"
21+
"d /var/lib/private/systemd/timesync -"
22+
"L /var/lib/systemd/timesync - - - - /var/lib/private/systemd/timesync"
23+
"d /var/lib/private/systemd/timesync - systemd-timesync systemd-timesync -"
24+
];
2425
});
2526
};
2627

0 commit comments

Comments
 (0)