WIP: feat(systemd): switch to systemd #33

Draft
lbailly wants to merge 8 commits from lbailly/liminix:systemd into main
Showing only changes of commit 14b59b5b62 - Show all commits

View file

@ -259,7 +259,12 @@ extraPkgs // {
patches = o.patches ++ [
./pkgs/qemu/arm-image-friendly-load-addr.patch
];
}); in q.override { nixosTestRunner = true; sdlSupport = false; hostCpuTargets = [ "mips-softmmu" ]; };
}); in q.override {
vde2 = null;
nixosTestRunner = true;
sdlSupport = false;
hostCpuTargets = [ "mips-softmmu" ];
};
rsyncSmall =
let r = prev.rsync.overrideAttrs(o: {
@ -330,54 +335,111 @@ extraPkgs // {
};
}) { };
systemd = prev.systemd.override {
withAcl = false;
withAnalyze = false;
withApparmor = false;
withAudit = false;
withBootloader = false;
# withCompression = true;
withCoredump = false;
withCryptsetup = false;
withRepart = false;
withDocumentation = false;
withEfi = false;
withFido2 = false;
withHomed = false;
# withHostnamed = true;
withHwdb = false;
withImportd = false;
withIptables = false;
withKmod = false;
withLibBPF = false;
withLibidn2 = false;
withLocaled = false;
withLogind = false;
withMachined = false;
withNetworkd = false;
withNss = false;
withOomd = false;
withPam = false;
withPasswordQuality = false;
withPCRE2 = false;
withPolkit = false;
withPortabled = false;
withQrencode = false;
withRemote = false;
withResolved = false;
# withShellCompletions = true;
# withSysusers = true;
withSysupdate = false;
# withTimedated = true;
# withTimesyncd = true;
withTpm2Tss = false;
withUkify = false;
withUserDb = false;
withUtmp = false;
withVmspawn = false;
withKernelInstall = false;
withLibarchive = false;
};
systemd =
let base = prev.systemd.override {
withAcl = false;
withAnalyze = false;
withApparmor = false;
withAudit = false;
withBootloader = false;
withCompression = false;
withCoredump = false;
withCryptsetup = false;
withRepart = false;
withDocumentation = false;
withEfi = false;
withFido2 = false;
withHomed = false;
withHostnamed = false;
withHwdb = false;
withImportd = false;
withIptables = false;
withKmod = false;
withLibBPF = false;
withLibidn2 = false;
withLocaled = false;
withLogind = false;
withMachined = false;
withNetworkd = false;
withNss = false;
withOomd = false;
withPam = false;
withPasswordQuality = false;
withPCRE2 = false;
withPolkit = false;
withPortabled = false;
withQrencode = false;
withRemote = false;
withResolved = false;
withShellCompletions = false;
withSysusers = false;
withSysupdate = false;
withTimedated = false;
withTimesyncd = false;
withTpm2Tss = false;
withUkify = false;
withUserDb = false;
withUtmp = false;
withVmspawn = false;
withKernelInstall = false;
withLibarchive = false;
};
in base.overrideAttrs (o: {
mesonFlags = o.mesonFlags ++ [
# "--optimization=s"
"--default-library=static"
"--buildtype=minsize"
];
postInstall = o.postInstall + ''
rm -rf $out/share
rm $out/lib/libudev.so*
rm -rf $out/lib/systemd/catalog
rm -rf $out/lib/systemd/system-generators
rm $out/lib/systemd/systemd-backlight
rm $out/lib/systemd/systemd-battery-check
rm $out/lib/systemd/systemd-hibernate-resume
rm $out/lib/systemd/systemd-makefs
rm $out/lib/systemd/systemd-nsresourced
rm $out/lib/systemd/systemd-nsresourcework
rm $out/lib/systemd/systemd-shutdown
rm $out/lib/systemd/systemd-sleep
rm $out/lib/systemd/systemd-binfmt
rm $out/lib/systemd/systemd-growfs
rm $out/lib/systemd/systemd-mountfsd
rm $out/lib/systemd/systemd-mountwork
rm $out/lib/systemd/systemd-network-generator
rm $out/lib/systemd/systemd-pstore
rm $out/lib/systemd/systemd-remount-fs
rm $out/lib/systemd/systemd-reply-password
rm $out/lib/systemd/systemd-rfkill
rm $out/lib/systemd/systemd-socket-proxyd
rm $out/lib/systemd/systemd-ssh-proxy
rm $out/lib/systemd/systemd-storagetm
rm $out/lib/systemd/systemd-volatile-root
rm $out/lib/systemd/systemd-xdg-autostart-condition
rm -rf $out/example
rm $out/bin/bootctl
rm $out/bin/systemd-nspawn
rm $out/bin/systemd-ac-power
rm $out/bin/systemd-dissect
rm $out/bin/systemd-ask-password
rm $out/bin/systemd-cgls
rm $out/bin/systemd-cgtop
rm $out/bin/systemd-creds
rm $out/bin/systemd-delta
rm $out/bin/systemd-detect-virt
rm $out/bin/systemd-escape
rm $out/bin/systemd-id128
rm $out/bin/systemd-machine-id-setup
rm $out/bin/systemd-path
rm $out/bin/systemd-run
rm $out/bin/systemd-socket-activate
rm $out/bin/systemd-stdio-bridge
rm $out/bin/systemd-sysext
rm $out/bin/systemd-tty-ask-password-agent
rm $out/bin/systemd-vpick
'';
});
ubootQemuAarch64 = final.buildUBoot {
defconfig = "qemu_arm64_defconfig";