reduce closure
Some checks failed
build liminix / build_vm_qemu_mips (pull_request) Successful in 3m7s
build liminix / build_zyxel-nwa50ax_mips (pull_request) Successful in 3m8s
build liminix / test_hostapd (pull_request) Failing after 4m7s
build liminix / test_shell_customization (pull_request) Failing after 4m8s
Some checks failed
build liminix / build_vm_qemu_mips (pull_request) Successful in 3m7s
build liminix / build_zyxel-nwa50ax_mips (pull_request) Successful in 3m8s
build liminix / test_hostapd (pull_request) Failing after 4m7s
build liminix / test_shell_customization (pull_request) Failing after 4m8s
This commit is contained in:
parent
9da241d8ec
commit
7219e66992
5 changed files with 52 additions and 8 deletions
|
@ -134,7 +134,10 @@ in {
|
|||
|
||||
# Set the useful PS1 prompt by default.
|
||||
defaultProfile.environmentVariables.PS1 = lib.mkDefault config.defaultProfile.prompt;
|
||||
defaultProfile.packages = with pkgs; [ execline ];
|
||||
defaultProfile.packages = with pkgs; [
|
||||
# execline
|
||||
systemd
|
||||
];
|
||||
|
||||
boot.commandLine = [
|
||||
"panic=10 oops=panic init=/bin/init loglevel=8"
|
||||
|
|
|
@ -51,7 +51,7 @@ let
|
|||
in {
|
||||
options = {
|
||||
programs.busybox = {
|
||||
applets = mkOption {
|
||||
applets = mkOption {
|
||||
type = types.listOf types.str;
|
||||
description = "Applets required";
|
||||
default = [];
|
||||
|
@ -62,13 +62,19 @@ in {
|
|||
# other strings are also used
|
||||
description = "Other busybox config flags that do not map directly to applet names (often prefixed FEATURE_)";
|
||||
type = types.attrsOf types.nonEmptyStr;
|
||||
default = { };
|
||||
example = { FEATURE_DD_IBS_OBS = "y"; };
|
||||
default = { };
|
||||
example = { FEATURE_DD_IBS_OBS = "y"; };
|
||||
};
|
||||
package = mkOption {
|
||||
type = types.package;
|
||||
readOnly = true;
|
||||
internal = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
config = {
|
||||
programs.busybox = {
|
||||
package = busybox;
|
||||
applets = minimalApplets;
|
||||
options = {
|
||||
ASH_ECHO = "y";
|
||||
|
|
|
@ -19,7 +19,7 @@ let
|
|||
serviceToUnit
|
||||
;
|
||||
|
||||
systemd-types = import ./types.nix { inherit pkgs utils lib; };
|
||||
systemd-types = import ./types.nix { inherit pkgs utils lib; busybox = config.programs.busybox.package; };
|
||||
|
||||
units-texts = mapAttrs' (
|
||||
_: unit:
|
||||
|
@ -103,7 +103,6 @@ in
|
|||
Before = [ "default.target" ];
|
||||
};
|
||||
script = ''
|
||||
#!/bin/ash
|
||||
# . /etc/profile
|
||||
exec /bin/ash < /dev/ttyS0 > /dev/ttyS0 2> /dev/ttyS0
|
||||
'';
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
{
|
||||
pkgs,
|
||||
lib,
|
||||
utils
|
||||
utils,
|
||||
busybox
|
||||
}:
|
||||
let
|
||||
inherit (utils.systemdUtils.lib) serviceConfig unitConfig;
|
||||
|
@ -10,7 +11,8 @@ let
|
|||
imports = [ serviceConfig ];
|
||||
# Default path for systemd services. Should be quite minimal.
|
||||
config.path = lib.mkAfter [
|
||||
pkgs.coreutils
|
||||
busybox
|
||||
# pkgs.coreutils
|
||||
# pkgs.gnugrep
|
||||
# pkgs.gnused
|
||||
pkgs.systemd
|
||||
|
|
34
overlay.nix
34
overlay.nix
|
@ -335,8 +335,28 @@ extraPkgs // {
|
|||
};
|
||||
}) { };
|
||||
|
||||
writeShellScriptBin = name: text:
|
||||
final.writeTextFile {
|
||||
inherit name;
|
||||
executable = true;
|
||||
destination = "/bin/${name}";
|
||||
text = ''
|
||||
#!/bin/ash
|
||||
${text}
|
||||
'';
|
||||
checkPhase = ''
|
||||
${final.stdenv.shellDryRun} "$target"
|
||||
'';
|
||||
meta.mainProgram = name;
|
||||
};
|
||||
|
||||
systemd =
|
||||
let base = prev.systemd.override {
|
||||
kbd = "";
|
||||
coreutils = "";
|
||||
bash = null;
|
||||
bashInteractive = "";
|
||||
|
||||
withAcl = false;
|
||||
withAnalyze = false;
|
||||
withApparmor = false;
|
||||
|
@ -389,6 +409,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 +469,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
|
||||
'';
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in a new issue