Compare commits

..

8 commits

Author SHA1 Message Date
643264bd69
fix(update): enableScrictShellChecks
Some checks failed
build liminix / build_vm_qemu_mips (pull_request) Failing after 22s
build liminix / build_zyxel-nwa50ax_mips (pull_request) Failing after 22s
build liminix / test_shell_customization (pull_request) Failing after 22s
build liminix / test_hostapd (pull_request) Failing after 22s
2024-11-08 22:44:42 +01:00
7219e66992
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
2024-10-07 18:03:49 +02:00
9da241d8ec
services & targets
Some checks failed
build liminix / build_zyxel-nwa50ax_mips (pull_request) Successful in 19s
build liminix / build_vm_qemu_mips (pull_request) Successful in 20s
build liminix / test_hostapd (pull_request) Failing after 1m18s
build liminix / test_shell_customization (pull_request) Failing after 1m21s
2024-10-06 22:06:08 +02:00
7705bc2a8e
units
Some checks failed
build liminix / build_vm_qemu_mips (pull_request) Successful in 33s
build liminix / build_zyxel-nwa50ax_mips (pull_request) Successful in 36s
build liminix / test_shell_customization (pull_request) Failing after 1m31s
build liminix / test_hostapd (pull_request) Failing after 10m59s
2024-10-05 11:50:12 +02:00
14b59b5b62
begin minimization of systemd
Some checks failed
build liminix / build_vm_qemu_mips (pull_request) Successful in 36s
build liminix / build_zyxel-nwa50ax_mips (pull_request) Successful in 39s
build liminix / test_shell_customization (pull_request) Failing after 6m39s
build liminix / test_hostapd (pull_request) Failing after 11m5s
trivial part
2024-10-04 15:57:57 +02:00
8c97f3e257
agetty 2024-10-04 15:57:57 +02:00
ae78f9aafd
systemd init 2024-10-04 15:57:57 +02:00
109c577084
systemd override 2024-10-04 15:00:45 +02:00
20 changed files with 418 additions and 171 deletions

View file

@ -25,7 +25,13 @@ let
eval = evalModules {
modules = [
{
({ lib, pkgs, ... }: {
_module.args = {
utils = import "${nixpkgs}/nixos/lib/utils.nix" {
inherit lib pkgs;
config.systemd.globalEnvironment = {};
};
};
nixpkgs = {
source = nixpkgs;
overlays = [ overlay ];
@ -33,7 +39,7 @@ let
"python-2.7.18.8"
];
};
}
})
device.module
liminix-config
];
@ -57,7 +63,7 @@ let
];
}).config.system;
in {
inherit evalModules;
inherit evalModules config;
outputs = config.system.outputs // {
default = config.system.outputs.${config.hardware.defaultOutput};

View file

@ -12,10 +12,9 @@ in
"${modulesPath}/hardware.nix"
"${modulesPath}/base.nix"
"${modulesPath}/busybox.nix"
"${modulesPath}/iproute2.nix"
"${modulesPath}/hostname.nix"
"${modulesPath}/kernel"
"${modulesPath}/s6"
"${modulesPath}/systemd"
"${modulesPath}/users.nix"
"${modulesPath}/outputs.nix"
"${modulesPath}/nixpkgs.nix"

View file

@ -4,10 +4,9 @@
{
imports = [
./base.nix
./base.nix
./bridge
./busybox.nix
./iproute2.nix
./dhcp6c
./jitter-rng
./dnsmasq

View file

@ -2,7 +2,7 @@
## ============
{ lib, pkgs, config, ...}:
{ lib, pkgs, utils, config, ...}:
let
inherit (lib) mkEnableOption mkOption types isDerivation hasAttr concatStringsSep mapAttrsToList;
inherit (pkgs.pseudofile) dir symlink;
@ -43,9 +43,12 @@ in {
'';
};
};
# deprecated
services = mkOption {
type = types.attrsOf type_service;
};
system.callService = mkOption {
type = types.functionTo (types.functionTo types.anything);
};
@ -129,10 +132,12 @@ in {
# By default, we enable cross-compilation support.
nixpkgs.buildPlatform = lib.mkDefault builtins.currentSystem;
defaultProfile.packages = with pkgs;
[ s6 s6-init-bin execline s6-linux-init s6-rc iproute2 ];
# Set the useful PS1 prompt by default.
defaultProfile.environmentVariables.PS1 = lib.mkDefault config.defaultProfile.prompt;
defaultProfile.packages = with pkgs; [
# execline
systemd
];
boot.commandLine = [
"panic=10 oops=panic init=/bin/init loglevel=8"

View file

@ -9,7 +9,8 @@
{ lib, pkgs, config, ...}:
let
inherit (lib) mkOption types mkEnableOption;
inherit (lib) mkOption types;
inherit (pkgs.liminix.services) oneshot;
inherit (pkgs) liminix;
in
{
@ -34,20 +35,6 @@ in
default = null;
description = "reuse mac address from an existing interface service";
};
untagged = {
enable = mkEnableOption "untagged frames on port VID";
pvid = mkOption {
type = types.nullOr types.int;
default = null;
description = "Port VLAN ID for egress untagged frames";
};
default-pvid = mkOption {
type = types.int;
default = 0;
description = "Default PVID for ingress untagged frames, defaults to 0, which disable untagged frames for ingress";
};
};
};
members = config.system.callService ./members.nix {
primary = mkOption {

View file

@ -3,22 +3,17 @@
, ifwait
, lib
}:
{ ifname, macAddressFromInterface ? null, untagged } :
{ ifname, macAddressFromInterface ? null } :
let
inherit (liminix.services) oneshot;
inherit (lib) optional optionalString;
# This enables vlan_filtering if we do make use of it.
extra = if untagged.enable then " vlan_filtering 1 vlan_default_pvid ${toString untagged.default-pvid}" else "";
inherit (liminix.services) bundle oneshot;
inherit (lib) mkOption types optional;
in oneshot rec {
name = "${ifname}.link";
up = ''
${if macAddressFromInterface == null then
"ip link add name ${ifname} type bridge${extra}"
"ip link add name ${ifname} type bridge"
else
"ip link add name ${ifname} address $(output ${macAddressFromInterface} ether) type bridge${extra}"}
${optionalString untagged.enable
"bridge vlan add vid ${toString untagged.pvid} dev ${ifname} pvid untagged self"}
"ip link add name ${ifname} address $(output ${macAddressFromInterface} ether) type bridge"}
(in_outputs ${name}
echo ${ifname} > ifname

View file

@ -37,7 +37,7 @@ let
"comm" "cp" "cpio" "cut" "date" "dhcprelay" "dd" "df" "dirname" "dmesg"
"du" "echo" "egrep" "env" "expand" "expr" "false" "fdisk" "fgrep" "find"
"free" "fuser" "grep" "gunzip" "gzip" "head" "hexdump" "hostname" "hwclock"
"ifconfig" "ipneigh" "kill"
"ifconfig" "ip" "ipaddr" "iplink" "ipneigh" "iproute" "iprule" "kill"
"killall" "killall5" "less" "ln" "ls" "lsattr" "lsof" "md5sum" "mkdir"
"mknod" "mktemp" "mount" "mv" "nc" "netstat" "nohup" "od" "pgrep" "pidof"
"ping" "ping6" "pkill" "pmap" "printenv" "printf" "ps" "pwd" "readlink"
@ -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";

View file

@ -1,28 +0,0 @@
{ config, pkgs, lib, ... }:
let
inherit (lib) mkEnableOption mkPackageOption mkIf genAttrs;
inherit (pkgs.pseudofile) dir symlink;
cfg = config.programs.iproute2;
minimalPrograms = [
"ip"
"devlink"
"ss"
"bridge"
"genl"
"ifstat"
"nstat"
];
links = genAttrs minimalPrograms (p: symlink "${cfg.package}/bin/${p}");
in
{
options.programs.iproute2 = {
enable = mkEnableOption "the iproute2 programs instead of busybox variants";
package = mkPackageOption pkgs "iproute2" { };
};
config = mkIf cfg.enable {
filesystem = dir {
bin = dir links;
};
};
}

View file

@ -54,7 +54,7 @@ in
mount -t sysfs none /sys
${busybox}/bin/sh
'';
refs = pkgs.writeClosure [ busybox ];
refs = pkgs.writeReferencesToFile busybox;
in runCommand "initramfs.cpio" {} ''
cat << SPECIALS | ${gen_init_cpio}/bin/gen_init_cpio /dev/stdin > out
dir /proc 0755 0 0

View file

@ -186,8 +186,11 @@ in {
};
};
};
# bin = dir {
# init = symlink "${s6-init-bin}/bin/init";
# };
bin = dir {
init = symlink "${s6-init-bin}/bin/init";
init = symlink "${pkgs.systemd}/bin/init";
};
};
};

View file

@ -1,19 +0,0 @@
#!/bin/sh
### Things to do before hardware halt/reboot/poweroff.
### Ideally, it should be a single call to the service manager,
### telling it to bring all the services down.
### If your s6-linux-init-maker invocation was made with the -1
### option, messages from rc.shutdown will appear on /dev/console
### as well as be logged by the catch-all logger.
### If your s6-linux-init-maker invocation did NOT include the -1
### option, messages from rc.shutdown will only be logged by the
### catch-all logger and will NOT appear on /dev/console. In order
### to print them to /dev/console instead, you may want to
### uncomment the following line:
exec >/dev/console 2>&1
### If your services are managed by s6-rc:
exec s6-rc -v2 -bDa change

View file

@ -1,22 +0,0 @@
#!/bin/sh -e
## s6-linux-init-shutdownd never tells s6-svscan to exit, so if
## you're running s6-linux-init, it's normal that your
## .s6-svscan/finish script is not executed.
## The place where you want to hack things is /etc/rc.shutdown.final,
## which is run by the stage 4 script right before the hard reboot.
## So you can do dirty stuff [...] which should clean up the
## s6-supervise and the foreground, and give control to
## .s6-svscan/finish.
## -- Laurent Bercot on skaware mailing list,
## https://skarnet.org/lists/skaware/1913.html
exec >/dev/console 2>&1
# down, exit supervisor, wait, stay down
s6-svc -dxwD /run/service/s6-linux-init-shutdownd
# HUP, exit supervisor, wait, down
s6-svc -hxwd /run/service/s6-svscan-log
s6-svscanctl -b /run/service # abort

View file

@ -1,12 +0,0 @@
#!/bin/sh -e
### This script is called once at boot time by rc.init, and is
### also called by the runleveld service every time the user
### requests a machine state change via telinit.
### Ideally, it should just be a call to the service manager.
test "$#" -gt 0 || { echo 'runlevel: fatal: too few arguments' 1>&2 ; exit 100 ; }
### If your services are managed by s6-rc:
exec s6-rc -v2 -up change "$1"

150
modules/systemd/default.nix Normal file
View file

@ -0,0 +1,150 @@
{
pkgs,
lib,
config,
utils,
...
}:
let
inherit (lib)
mapAttrs'
nameValuePair
mkMerge
mapAttrsToList
mkOption
;
inherit (pkgs.pseudofile) dir symlink;
inherit (utils.systemdUtils.lib)
targetToUnit
serviceToUnit
;
systemd-types = import ./types.nix { inherit pkgs utils lib; busybox = config.programs.busybox.package; };
units-texts = mapAttrs' (
_: unit:
nameValuePair unit.name {
file = unit.text;
mode = "0644";
}
) config.systemd.units;
units-aliases = mkMerge (
mapAttrsToList (
_: unit:
mkMerge (
map (aka: {
${aka} = symlink "${unit.name}";
}) (unit.aliases or [ ])
)
) config.systemd.units
);
units-extraWants = mkMerge (
mapAttrsToList (
_: unit:
mkMerge (
map (unit2: {
"${unit2}.wants" = dir {
${unit.name} = symlink "../${unit.name}";
};
}) (unit.wantedBy or [ ])
)
) config.systemd.units
);
units-extraUpholds = mkMerge (
mapAttrsToList (
_: unit:
mkMerge (
map (unit2: {
"${unit2}.upholds" = dir {
${unit.name} = symlink "../${unit.name}";
};
}) (unit.upheldBy or [ ])
)
) config.systemd.units
);
units-extraRequires = mkMerge (
mapAttrsToList (
_: unit:
mkMerge (
map (unit2: {
"${unit2}.requires" = dir {
${unit.name} = symlink "../${unit.name}";
};
}) (unit.requiredBy or [ ])
)
) config.systemd.units
);
in
{
options = {
systemd = {
units = mkOption {
type = systemd-types.units;
};
services = mkOption {
type = systemd-types.services;
};
targets = mkOption {
type = systemd-types.targets;
};
};
};
config = {
systemd = {
units = mkMerge [
(mapAttrs' (_: service: nameValuePair service.name (serviceToUnit service)) config.systemd.services)
(mapAttrs' (_: target: nameValuePair target.name (targetToUnit target)) config.systemd.targets)
];
services = {
getty = {
wantedBy = [ "default.target" ];
unitConfig = {
Description = "Serial Shell";
Before = [ "default.target" ];
};
script = ''
# . /etc/profile
exec /bin/ash < /dev/ttyS0 > /dev/ttyS0 2> /dev/ttyS0
'';
};
};
targets = {
default = { };
sysinit = { };
};
};
kernel.config = {
CGROUPS = "y";
DEVTMPFS = "y";
INOTIFY_USER = "y";
SIGNALFD = "y";
TIMERFD = "y";
EPOLL = "y";
UNIX = "y";
SYSFS = "y";
PROC_FS = "y";
FHANDLE = "y";
};
boot.commandLine = [
"systemd.log_level=7"
#"systemd.crash_shell=true"
];
filesystem = dir {
etc = dir {
systemd = dir {
system = dir (mkMerge [
units-texts
units-aliases
units-extraWants
units-extraUpholds
units-extraRequires
]);
};
};
bin = dir {
init = symlink "${pkgs.systemd}/bin/init";
};
};
};
}

30
modules/systemd/types.nix Normal file
View file

@ -0,0 +1,30 @@
{
pkgs,
lib,
utils,
busybox
}:
let
inherit (utils.systemdUtils.lib) serviceConfig unitConfig;
inherit (utils.systemdUtils.unitOptions) stage2ServiceOptions;
stage2ServiceConfig = {
imports = [ serviceConfig ];
# Default path for systemd services. Should be quite minimal.
config.path = lib.mkAfter [
busybox
# pkgs.coreutils
# pkgs.gnugrep
# pkgs.gnused
pkgs.systemd
];
};
in
{
inherit (utils.systemdUtils.types) units targets;
services = lib.types.attrsOf (lib.types.submodule [
{ enableStrictShellChecks = false; }
unitConfig
stage2ServiceOptions
stage2ServiceConfig
]);
}

View file

@ -33,11 +33,6 @@ in
description = "VLAN identifier (VID) in range 1-4094";
type = types.str;
};
untagged.egress = mkOption {
description = "Whether packets from this interface will go out *untagged*";
type = types.bool;
default = false;
};
};
config.kernel.config = {
VLAN_8021Q = "y";

View file

@ -2,15 +2,13 @@
liminix
, lib
}:
{ ifname, primary, vid, untagged } :
{ ifname, primary, vid } :
let
inherit (lib) optionalString;
inherit (liminix.services) oneshot;
in oneshot rec {
name = "${ifname}.link";
up = ''
ip link add link $(output ${primary} ifname) name ${ifname} type vlan id ${vid}
${optionalString untagged.egress "bridge vlan add dev ${ifname} vid ${toString untagged.vid} pvid untagged master"}
${liminix.networking.ifup name ifname}
(in_outputs ${name}
echo ${ifname} > ifname

View file

@ -141,9 +141,7 @@ extraPkgs // {
repo = "hostapd";
rev = "hostap-liminix-integration";
hash = "sha256-5Xi90keCHxvuKR5Q7STuZDzuM9h9ac6aWoXVQYvqkQI=";
};
# Do not take any patch.
patches = [];
};
extraConfig = "";
configurePhase = ''
cat > hostapd/defconfig <<EOF
@ -186,7 +184,6 @@ extraPkgs // {
rev = "hostap-liminix-integration";
hash = "sha256-5Xi90keCHxvuKR5Q7STuZDzuM9h9ac6aWoXVQYvqkQI=";
};
patches = [];
extraConfig = "";
configurePhase = ''
cat > hostapd/defconfig <<EOF
@ -197,30 +194,6 @@ extraPkgs // {
});
in h.override { openssl = null; sqlite = null; };
libnl = prev.libnl.override {
graphviz = null;
};
iproute2 =
let i = prev.iproute2.overrideAttrs (old: {
postInstall = ''
${(old.postInstall or "")}
non_necessary_binaries=("tc" "rdma" "dcb" "tipc" "vdpa")
for needless_binary in "''${non_necessary_binaries[@]}"; do
echo "Removing unnecessary binary $out/sbin/$needless_binary"
rm "$out/sbin/$needless_binary"
done
# No man
rm -rf "$out/share"
# Remove all the data about distributions for tc.
rm -rf "$out/lib"
'';
});
# Don't bring ebpf stuff to the table.
# We also remove tc so we can drop iptables as well.
# Let's try to kill `db` as well.
in i.override { elfutils = null; iptables = null; db = null; };
wpa_supplicant = prev.wpa_supplicant.override {
dbusSupport = false;
withPcsclite = false;
@ -286,7 +259,12 @@ extraPkgs // {
patches = o.patches ++ [
./pkgs/qemu/arm-image-friendly-load-addr.patch
];
}); in q.override { nixosTestRunner = true; sdlSupport = false; };
}); in q.override {
vde2 = null;
nixosTestRunner = true;
sdlSupport = false;
hostCpuTargets = [ "mips-softmmu" ];
};
rsyncSmall =
let r = prev.rsync.overrideAttrs(o: {
@ -311,6 +289,192 @@ extraPkgs // {
strace = prev.strace.override { libunwind = null; };
getent =
prev.callPackage ({
lib,
stdenv,
fetchFromGitHub,
}:
stdenv.mkDerivation rec {
pname = "musl-utils";
version = "1.1.12-r7";
src = fetchFromGitHub {
owner = "boltlinux";
repo = "musl-utils";
rev = version;
hash = "sha256-q9CbOyK0Psw3YJnIT3yPRWuwr40nxLZt4RexuOHAUuw=";
};
nativeBuildInputs = [
prev.autoconf
prev.automake
];
preConfigure = ''
autoreconf -i
'';
buildPhase = ''
make -C src getent
'';
installPhase = ''
mkdir -p $out/bin/
cp src/getent $out/bin/
'';
meta = {
description = "Alpine Linux' getconf, getent and iconv implementations";
homepage = "https://github.com/boltlinux/musl-utils";
license = lib.licenses.free; # FIXME: nix-init did not find a license
maintainers = with lib.maintainers; [ ];
mainProgram = "musl-utils";
platforms = lib.platforms.all;
};
}) { };
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;
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"
# (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
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
# rm $out/lib/libsystemd.a
# rm $out/lib/systemd/libsystemd-shared-256.so
'';
});
ubootQemuAarch64 = final.buildUBoot {
defconfig = "qemu_arm64_defconfig";
extraMeta.platforms = ["aarch64-linux"];

View file

@ -3,7 +3,7 @@
, pkgsBuildBuild
, runCommand
, cpio
, writeClosure
, writeReferencesToFile
, writeScript
} :
let
@ -18,7 +18,7 @@ let
mount -t sysfs none /sys
${busybox}/bin/sh
'';
refs = writeClosure [ busybox ];
refs = writeReferencesToFile busybox;
in runCommand "initramfs.cpio" { } ''
cat << SPECIALS | ${gen_init_cpio}/bin/gen_init_cpio /dev/stdin > out
dir /proc 0755 0 0

View file

@ -2,7 +2,6 @@
writeScriptBin
, writeScript
, systemconfig
, stdenv
, execline
, lib
, config ? {}
@ -57,19 +56,11 @@ let
};
eval = lib.evalModules {
modules = [
{ _module.args = { inherit pkgs; inherit (pkgs) lim; }; }
../../modules/base.nix
../../modules/users.nix
../../modules/busybox.nix
../../modules/hostname.nix
../../modules/misc/assertions.nix
../../modules/nixpkgs.nix
base
{
# Inherit from that target system host platform.
nixpkgs.hostPlatform = stdenv.hostPlatform;
# Force our own package set.
nixpkgs.pkgs = lib.mkForce pkgs;
}
({ ... } : paramConfig)
../../modules/s6
];