Skip to content

Commit

Permalink
nixos/systemd: Enable systemd-machine-id-commit.service (#351151)
Browse files Browse the repository at this point in the history
  • Loading branch information
emilazy authored Oct 26, 2024
2 parents 973b380 + 8f4b41c commit 7f753fb
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions nixos/modules/system/boot/systemd.nix
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,7 @@ let

# Misc.
"systemd-sysctl.service"
"systemd-machine-id-commit.service"
] ++ optionals cfg.package.withTimedated [
"dbus-org.freedesktop.timedate1.service"
"systemd-timedated.service"
Expand Down
7 changes: 7 additions & 0 deletions nixos/tests/systemd.nix
Original file line number Diff line number Diff line change
Expand Up @@ -85,10 +85,17 @@ import ./make-test-python.nix ({ pkgs, ... }: {
import re
import subprocess
machine.start(allow_reboot=True)
# Will not succeed unless ConditionFirstBoot=yes
machine.wait_for_unit("first-boot-complete.target")
# Make sure, a subsequent boot isn't a ConditionFirstBoot=yes.
machine.reboot()
machine.wait_for_x()
state = machine.get_unit_info("first-boot-complete.target")['ActiveState']
assert state == 'inactive', "Detected first boot despite first-boot-completed.target was already reached on a previous boot."
# wait for user services
machine.wait_for_unit("default.target", "alice")
Expand Down

0 comments on commit 7f753fb

Please sign in to comment.