+1
doc/release-notes/rl-2511.section.md
+1
doc/release-notes/rl-2511.section.md
···and newer series. However, embedded chips without LSX (Loongson SIMD eXtension), such as 2K0300 SoC, are notsupported. `pkgsCross.loongarch64-linux-embedded` can be used to build software and systems for these platforms.- The official Nix formatter `nixfmt` is now stable and available as `pkgs.nixfmt`, deprecating the temporary `pkgs.nixfmt-rfc-style` attribute. The classic `nixfmt` will stay available for some more time as `pkgs.nixfmt-classic`.+- Added `nixos-init`, a Rust-based bashless initialization system for systemd initrd. This allows to build NixOS systems without any interpreter. Enable via `system.nixos-init.enable = true;`.
+1
nixos/modules/module-list.nix
+1
nixos/modules/module-list.nix
···
+31
nixos/modules/system/activation/nixos-init.nix
+31
nixos/modules/system/activation/nixos-init.nix
···
+5
-2
nixos/modules/system/activation/top-level.nix
+5
-2
nixos/modules/system/activation/top-level.nix
···
+54
-15
nixos/modules/system/boot/systemd/initrd.nix
+54
-15
nixos/modules/system/boot/systemd/initrd.nix
···············
+2
-19
nixos/modules/system/etc/etc-activation.nix
+2
-19
nixos/modules/system/etc/etc-activation.nix
······-metadata_image="$(${pkgs.chroot-realpath}/bin/chroot-realpath /sysroot "$closure/etc-metadata-image")"
+54
nixos/tests/activation/nixos-init.nix
+54
nixos/tests/activation/nixos-init.nix
···+findmnt_output = machine.succeed("findmnt --direction backward --first-only --noheadings --output OPTIONS /nix/store").strip()+t.assertEqual("${nodes.machine.system.build.toplevel}", machine.succeed("readlink /run/booted-system").strip())+t.assertEqual("${nodes.machine.system.build.toplevel}", machine.succeed("readlink /run/current-system").strip())+t.assertEqual("${nodes.machine.hardware.firmware}/lib/firmware", machine.succeed("cat /sys/module/firmware_class/parameters/path").strip())+t.assertEqual("${pkgs.kmod}/bin/modprobe", machine.succeed("cat /proc/sys/kernel/modprobe").strip())+t.assertEqual("${nodes.machine.environment.usrbinenv}", machine.succeed("readlink /usr/bin/env").strip())+t.assertEqual("${nodes.machine.environment.binsh}", machine.succeed("readlink /bin/sh").strip())+t.assertIn("(initrd)", systemd_analyze_output, "systemd-analyze has no information about the initrd")
+1
nixos/tests/all-tests.nix
+1
nixos/tests/all-tests.nix
···
+1
-1
nixos/tests/installer.nix
+1
-1
nixos/tests/installer.nix
-21
pkgs/by-name/ch/chroot-realpath/package.nix
-21
pkgs/by-name/ch/chroot-realpath/package.nix
···
-16
pkgs/by-name/ch/chroot-realpath/src/Cargo.lock
-16
pkgs/by-name/ch/chroot-realpath/src/Cargo.lock
···
-10
pkgs/by-name/ch/chroot-realpath/src/Cargo.toml
-10
pkgs/by-name/ch/chroot-realpath/src/Cargo.toml
-26
pkgs/by-name/ch/chroot-realpath/src/src/main.rs
-26
pkgs/by-name/ch/chroot-realpath/src/src/main.rs
···
+6
pkgs/by-name/ni/nixos-init/.gitignore
+6
pkgs/by-name/ni/nixos-init/.gitignore
+312
pkgs/by-name/ni/nixos-init/Cargo.lock
+312
pkgs/by-name/ni/nixos-init/Cargo.lock
···
+27
pkgs/by-name/ni/nixos-init/Cargo.toml
+27
pkgs/by-name/ni/nixos-init/Cargo.toml
···
+67
pkgs/by-name/ni/nixos-init/README.md
+67
pkgs/by-name/ni/nixos-init/README.md
···
+64
pkgs/by-name/ni/nixos-init/package.nix
+64
pkgs/by-name/ni/nixos-init/package.nix
···
+101
pkgs/by-name/ni/nixos-init/src/activate.rs
+101
pkgs/by-name/ni/nixos-init/src/activate.rs
···+// This uses the procfs setup in the initrd, which is fine because it points to the same kernel+/// `/bin/sh` is an essential part of a Linux system as this path is hardcoded in the `system()` call
+52
pkgs/by-name/ni/nixos-init/src/chroot_realpath.rs
+52
pkgs/by-name/ni/nixos-init/src/chroot_realpath.rs
···
+43
pkgs/by-name/ni/nixos-init/src/config.rs
+43
pkgs/by-name/ni/nixos-init/src/config.rs
···
+31
pkgs/by-name/ni/nixos-init/src/find_etc.rs
+31
pkgs/by-name/ni/nixos-init/src/find_etc.rs
···+/// This avoids needing a reference to the toplevel embedded in the initrd and thus reduces the
+50
pkgs/by-name/ni/nixos-init/src/fs.rs
+50
pkgs/by-name/ni/nixos-init/src/fs.rs
···+/// This will first symlink the original to a temporary path with a `.tmp` suffix and then move the+/// The temporary and actual paths are located in the same directory, which is created if it does
+106
pkgs/by-name/ni/nixos-init/src/init.rs
+106
pkgs/by-name/ni/nixos-init/src/init.rs
···
+26
pkgs/by-name/ni/nixos-init/src/initrd_init.rs
+26
pkgs/by-name/ni/nixos-init/src/initrd_init.rs
···
+128
pkgs/by-name/ni/nixos-init/src/lib.rs
+128
pkgs/by-name/ni/nixos-init/src/lib.rs
···
+54
pkgs/by-name/ni/nixos-init/src/main.rs
+54
pkgs/by-name/ni/nixos-init/src/main.rs
···
+103
pkgs/by-name/ni/nixos-init/src/proc_mounts.rs
+103
pkgs/by-name/ni/nixos-init/src/proc_mounts.rs
···+/dev/mapper/root / btrfs rw,noatime,compress=zstd:3,ssd,discard=async,space_cache=v2,subvolid=5,subvol=/ 0 0+/dev/mapper/root /nix/store btrfs ro,nosuid,nodev,noatime,compress=zstd:3,ssd,discard=async,space_cache=v2,subvolid=5,subvol=/ 0 0+cgroup2 /sys/fs/cgroup cgroup2 rw,nosuid,nodev,noexec,relatime,nsdelegate,memory_recursiveprot 0 0
+35
pkgs/by-name/ni/nixos-init/src/switch_root.rs
+35
pkgs/by-name/ni/nixos-init/src/switch_root.rs
···