diff --git a/nixos/modules/system/boot/systemd.nix b/nixos/modules/system/boot/systemd.nix index 33b350902a1a373..9e3c6149f9223b3 100644 --- a/nixos/modules/system/boot/systemd.nix +++ b/nixos/modules/system/boot/systemd.nix @@ -63,6 +63,7 @@ let "systemd-logind.service" "autovt@.service" "systemd-user-sessions.service" + "dbus-org.freedesktop.import1.service" "dbus-org.freedesktop.machine1.service" "user@.service" "user-runtime-dir@.service" @@ -145,6 +146,7 @@ let "user.slice" "machine.slice" "machines.target" + "systemd-importd.service" "systemd-machined.service" "systemd-nspawn@.service" diff --git a/pkgs/os-specific/linux/systemd/default.nix b/pkgs/os-specific/linux/systemd/default.nix index a7ed32ab69646f7..79294a36a151b81 100644 --- a/pkgs/os-specific/linux/systemd/default.nix +++ b/pkgs/os-specific/linux/systemd/default.nix @@ -1,5 +1,5 @@ -{ stdenv, lib, fetchFromGitHub, fetchpatch, pkgconfig, intltool, gperf, libcap, kmod -, xz, pam, acl, libuuid, m4, utillinux, libffi +{ stdenv, lib, fetchFromGitHub, fetchpatch, pkgconfig, intltool, gperf, libcap +, curl, dbus, kmod, gnupg, gnutar, xz, pam, acl, libuuid, m4, utillinux, libffi , glib, kbd, libxslt, coreutils, libgcrypt, libgpgerror, libidn2, libapparmor , audit, lz4, bzip2, libmicrohttpd, pcre2 , linuxHeaders ? stdenv.cc.libc.linuxHeaders @@ -41,7 +41,7 @@ stdenv.mkDerivation { (buildPackages.python3Packages.python.withPackages ( ps: with ps; [ python3Packages.lxml ])) ]; buildInputs = - [ linuxHeaders libcap kmod xz pam acl + [ linuxHeaders libcap curl.dev kmod xz pam acl /* cryptsetup */ libuuid glib libgcrypt libgpgerror libidn2 libmicrohttpd pcre2 ] ++ stdenv.lib.optional withKexectools kexectools ++ @@ -66,6 +66,7 @@ stdenv.mkDerivation { "-Dtty-gid=3" # tty in NixOS has gid 3 # while we do not run tests we should also not build them. Removes about 600 targets "-Dtests=false" + "-Dimportd=true" "-Dlz4=true" "-Dhostnamed=true" "-Dnetworkd=true" @@ -76,7 +77,7 @@ stdenv.mkDerivation { "-Dlocaled=true" "-Dresolve=true" "-Dsplit-usr=false" - "-Dlibcurl=false" + "-Dlibcurl=true" "-Dlibidn=false" "-Dlibidn2=true" "-Dquotacheck=false" @@ -132,6 +133,15 @@ stdenv.mkDerivation { patchShebangs $dir done + # absolute paths to gpg & tar + substituteInPlace src/import/pull-common.c \ + --replace '"gpg"' '"${gnupg}/bin/gpg"' \ + --replace '"gpg2"' '"${gnupg}/bin/gpg2"' + for file in src/import/{{export,import,pull}-tar,import-common}.c; do + substituteInPlace $file \ + --replace '"tar"' '"${gnutar}/bin/tar"' + done + substituteInPlace src/journal/catalog.c \ --replace /usr/lib/systemd/catalog/ $out/lib/systemd/catalog/ ''; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 7b9fb0c2fd2979f..db5013082308ebf 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -16519,6 +16519,12 @@ in systemd = callPackage ../os-specific/linux/systemd { utillinux = utillinuxMinimal; # break the cyclic dependency + dbus = dbus.override { systemd = null; }; # break the cyclic dependency + gnupg = gnupg.override { + guiSupport = false; + pcsclite = null; + libusb = null; + }; # break the cyclic dependency }; udev = systemd; # TODO: move to aliases.nix