diff options
author | Yureka <yuka@yuka.dev> | 2022-09-13 10:32:35 +0200 |
---|---|---|
committer | Yureka <yuka@yuka.dev> | 2022-09-13 10:32:35 +0200 |
commit | 48178658878ab2de38d7f92172a6b8047b2bd112 (patch) | |
tree | b7b69463022c89eed960199c104f1298e4f45663 /pkgs/os-specific/linux/systemd | |
parent | 723a5645b5b958d7dc9ec515b567d467ea6536b1 (diff) | |
download | nixpkgs-48178658878ab2de38d7f92172a6b8047b2bd112.tar nixpkgs-48178658878ab2de38d7f92172a6b8047b2bd112.tar.gz nixpkgs-48178658878ab2de38d7f92172a6b8047b2bd112.tar.bz2 nixpkgs-48178658878ab2de38d7f92172a6b8047b2bd112.tar.lz nixpkgs-48178658878ab2de38d7f92172a6b8047b2bd112.tar.xz nixpkgs-48178658878ab2de38d7f92172a6b8047b2bd112.tar.zst nixpkgs-48178658878ab2de38d7f92172a6b8047b2bd112.zip |
systemd: add withUtmp flag and inherit in passthru
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.
Diffstat (limited to 'pkgs/os-specific/linux/systemd')
-rw-r--r-- | pkgs/os-specific/linux/systemd/default.nix | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/pkgs/os-specific/linux/systemd/default.nix b/pkgs/os-specific/linux/systemd/default.nix index e158cba54e6..a14883ff5f2 100644 --- a/pkgs/os-specific/linux/systemd/default.nix +++ b/pkgs/os-specific/linux/systemd/default.nix @@ -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; |