Skip to content

Commit

Permalink
systemd: add withUtmp flag and inherit in passthru
Browse files Browse the repository at this point in the history
The NixOS systemd module has to include some upstream unit files
depending on if the systemd package was built with utmp support.
This makes it possible for the NixOS systemd module to detect if the
systemd package was built with utmp support.
  • Loading branch information
yu-re-ka committed Sep 13, 2022
1 parent 723a564 commit 4817865
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions pkgs/os-specific/linux/systemd/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@
, withTimesyncd ? true
, withTpm2Tss ? !stdenv.hostPlatform.isMusl
, withUserDb ? !stdenv.hostPlatform.isMusl
, withUtmp ? !stdenv.hostPlatform.isMusl
# tests assume too much system access for them to be feasible for us right now
, withTests ? false

Expand Down Expand Up @@ -502,9 +503,10 @@ stdenv.mkDerivation {
"-Dbpf-framework=true"
] ++ lib.optionals withTpm2Tss [
"-Dtpm2=true"
] ++ lib.optionals (!withUtmp) [
"-Dutmp=false"
] ++ lib.optionals stdenv.hostPlatform.isMusl [
"-Dgshadow=false"
"-Dutmp=false"
"-Didn=false"
];
preConfigure =
Expand Down Expand Up @@ -683,7 +685,7 @@ stdenv.mkDerivation {
# runtime; otherwise we can't and we need to reboot.
interfaceVersion = 2;

inherit withCryptsetup withHostnamed withImportd withLocaled withMachined withTimedated util-linux kmod kbd;
inherit withCryptsetup withHostnamed withImportd withLocaled withMachined withTimedated withUtmp util-linux kmod kbd;

tests = {
inherit (nixosTests) switchTest;
Expand Down

0 comments on commit 4817865

Please sign in to comment.