Merge pull request #191032 from yu-re-ka/systemd-nixos-utmp

nixos/systemd: conditionally include systemd-update-utmp upstream unit
This commit is contained in:
Florian Klink 2022-09-13 11:26:07 +02:00 committed by GitHub
commit a81b6401f6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 3 deletions

View File

@ -121,7 +121,7 @@ let
"final.target"
"kexec.target"
"systemd-kexec.service"
"systemd-update-utmp.service"
] ++ lib.optional (cfg.package.withUtmp or true) "systemd-update-utmp.service" ++ [
# Password entry.
"systemd-ask-password-console.path"

View File

@ -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
@ -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 =
@ -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;