Unverified Commit ade259a2 authored by Grimmauld's avatar Grimmauld
Browse files

systemd: disable utmp on musl

Fixes https://github.com/NixOS/nixpkgs/pull/461277#issuecomment-3556593423

Musl does not have utmp. Systemd implicitly disables utmp support,
but we need to document this disable in nix or else `nixos/modules/system/boot/systemd.nix`
will attempt to load a non-existant service resulting in errors.
parent 6ab7e3d7
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -156,7 +156,11 @@
  # adds python to closure which is too much by default
  withUkify ? false,
  withUserDb ? true,
  withUtmp ? true,
  # utmp does not exist on musl, so it would be implicitly disabled
  # It is important to document the lack of utmp in nix,
  # otherwise the condition for systemd-update-utmp.service will
  # attempt to load a service which does not exist, resulting in errors.
  withUtmp ? !stdenv.hostPlatform.isMusl,
  withVmspawn ? true,
  # kernel-install shouldn't usually be used on NixOS, but can be useful, e.g. for
  # building disk images for non-NixOS systems. To save users from trying to use it