diff --git a/modules/systemd/default.nix b/modules/systemd/default.nix index 8a9a15c..1d161c7 100644 --- a/modules/systemd/default.nix +++ b/modules/systemd/default.nix @@ -103,7 +103,6 @@ in Before = [ "default.target" ]; }; script = '' - #!/bin/ash # . /etc/profile exec /bin/ash < /dev/ttyS0 > /dev/ttyS0 2> /dev/ttyS0 ''; diff --git a/overlay.nix b/overlay.nix index 1e9b150..f5b5804 100644 --- a/overlay.nix +++ b/overlay.nix @@ -335,8 +335,26 @@ extraPkgs // { }; }) { }; + writeShellScriptBin = name: text: + final.writeTextFile { + inherit name; + executable = true; + destination = "/bin/${name}"; + text = '' + #!${final.execline}/bin/ash + ${text} + ''; + checkPhase = '' + ${final.stdenv.shellDryRun} "$target" + ''; + meta.mainProgram = name; + }; + systemd = let base = prev.systemd.override { + bash = null; + bashInteractive = ""; + withAcl = false; withAnalyze = false; withApparmor = false; @@ -389,6 +407,17 @@ extraPkgs // { # "--optimization=s" "--default-library=static" "--buildtype=minsize" + # (final.lib.mesonBool "static-libsystemd" true) + # (final.lib.mesonBool "standalone-binaries" true) + + # (final.lib.mesonBool "link-udev-shared" false) + # (final.lib.mesonBool "link-executor-shared" false) + # (final.lib.mesonBool "link-systemctl-shared" false) + # (final.lib.mesonBool "link-networkd-shared" false) + # (final.lib.mesonBool "link-timesyncd-shared" false) + # (final.lib.mesonBool "link-journalctl-shared" false) + # (final.lib.mesonBool "link-boot-shared" false) + # (final.lib.mesonBool "link-portabled-shared" false) ]; postInstall = o.postInstall + '' rm -rf $out/share @@ -438,6 +467,9 @@ extraPkgs // { rm $out/bin/systemd-sysext rm $out/bin/systemd-tty-ask-password-agent rm $out/bin/systemd-vpick + + # rm $out/lib/libsystemd.a + # rm $out/lib/systemd/libsystemd-shared-256.so ''; });