+34
-50
nixos/lib/systemd-lib.nix
+34
-50
nixos/lib/systemd-lib.nix
···+generateUnits = { allowCollisions ? true, type, units, upstreamUnits, upstreamWants, packages ? cfg.packages, package ? cfg.package }:···············-environment.PATH = "${makeBinPath config.path}:${makeSearchPathOutput "bin" "sbin" config.path}";+config.environment.PATH = mkIf (config.path != []) "${makeBinPath config.path}:${makeSearchPathOutput "bin" "sbin" config.path}";···in if stringLength s >= 1048576 then throw "The value of the environment variable ‘${n}’ in systemd service ‘${name}.service’ is too long." else s) (attrNames env)}
+37
nixos/lib/systemd-types.nix
+37
nixos/lib/systemd-types.nix
···+services = with types; attrsOf (submodule [ stage2ServiceOptions unitConfig stage2ServiceConfig ]);+initrdServices = with types; attrsOf (submodule [ stage1ServiceOptions unitConfig stage1ServiceConfig ]);+automounts = with types; listOf (submodule [ stage2AutomountOptions unitConfig automountConfig ]);+initrdAutomounts = with types; attrsOf (submodule [ stage1AutomountOptions unitConfig automountConfig ]);
+262
-129
nixos/lib/systemd-unit-options.nix
+262
-129
nixos/lib/systemd-unit-options.nix
······························
+1
nixos/lib/utils.nix
+1
nixos/lib/utils.nix
+26
-14
nixos/modules/misc/version.nix
+26
-14
nixos/modules/misc/version.nix
······
+1
nixos/modules/module-list.nix
+1
nixos/modules/module-list.nix
+6
-2
nixos/modules/system/boot/stage-1.nix
+6
-2
nixos/modules/system/boot/stage-1.nix
···
+18
-25
nixos/modules/system/boot/systemd.nix
+18
-25
nixos/modules/system/boot/systemd.nix
·········-type = with types; attrsOf (submodule [ { options = serviceOptions; } unitConfig serviceConfig ]);···-type = with types; listOf (submodule [ { options = automountOptions; } unitConfig automountConfig ]);······+prevent a upstream systemd unit from being added to the initrd with any modifications made to it···-"systemd/system".source = generateUnits "system" enabledUnits enabledUpstreamSystemUnits upstreamSystemWants;
+417
nixos/modules/system/boot/systemd/initrd.nix
+417
nixos/modules/system/boot/systemd/initrd.nix
···+opts = options ++ optional autoFormat "x-systemd.makefs" ++ optional autoResize "x-systemd.growfs";+in "${device} /sysroot${mountPoint} ${fsType} ${lib.concatStringsSep "," opts}") fileSystems);+contents = map (path: { object = path; symlink = ""; }) (subtractLists cfg.suppressedStorePaths cfg.storePaths)+++ mapAttrsToList (_: v: { object = v.source; symlink = v.target; }) (filterAttrs (_: v: v.enable) cfg.contents);+enable = mkEnableOption "copying of this file to initrd and symlinking it" // { default = true; };+prevent a upstream systemd unit from being added to the initrd with any modifications made to it+"/etc/modules-load.d/nixos.conf".text = concatStringsSep "\n" config.boot.initrd.kernelModules;+"/etc/shadow".text = "root:${if isBool cfg.emergencyAccess then "!" else cfg.emergencyAccess}:::::::";
+7
-1
nixos/modules/system/boot/systemd/nspawn.nix
+7
-1
nixos/modules/system/boot/systemd/nspawn.nix
···-environment.etc."systemd/nspawn".source = mkIf (cfg != {}) (generateUnits' false "nspawn" units [] []);
+13
-18
nixos/modules/system/boot/systemd/user.nix
+13
-18
nixos/modules/system/boot/systemd/user.nix
······-type = with types; attrsOf (submodule [ { options = serviceOptions; } unitConfig serviceConfig ] );···
+1
-1
nixos/modules/tasks/filesystems.nix
+1
-1
nixos/modules/tasks/filesystems.nix
···+in listToAttrs (map formatDevice (filter (fs: fs.autoFormat && !(utils.fsNeededForBoot fs)) fileSystems)) // {# Mount /sys/fs/pstore for evacuating panic logs and crashdumps from persistent storage onto the disk using systemd-pstore.# This cannot be done with the other special filesystems because the pstore module (which creates the mount point) is not loaded then.
+24
nixos/modules/virtualisation/qemu-vm.nix
+24
nixos/modules/virtualisation/qemu-vm.nix
······+options = "lowerdir=/sysroot/nix/.ro-store,upperdir=/sysroot/nix/.rw-store/store,workdir=/sysroot/nix/.rw-store/work";+requires = ["sysroot-nix-.ro\\x2dstore.mount" "sysroot-nix-.rw\\x2dstore.mount" "rw-store.service"];+after = ["sysroot-nix-.ro\\x2dstore.mount" "sysroot-nix-.rw\\x2dstore.mount" "rw-store.service"];+ExecStart = "/bin/mkdir -p 0755 /sysroot/nix/.rw-store/store /sysroot/nix/.rw-store/work /sysroot/nix/store";
+1
nixos/tests/all-tests.nix
+1
nixos/tests/all-tests.nix
···
+27
nixos/tests/systemd-initrd-simple.nix
+27
nixos/tests/systemd-initrd-simple.nix
···
+2
-19
pkgs/build-support/docker/default.nix
+2
-19
pkgs/build-support/docker/default.nix
······
+24
pkgs/build-support/fake-nss/default.nix
+24
pkgs/build-support/fake-nss/default.nix
···
+9
pkgs/build-support/kernel/make-initrd-ng-tool.nix
+9
pkgs/build-support/kernel/make-initrd-ng-tool.nix
+79
pkgs/build-support/kernel/make-initrd-ng.nix
+79
pkgs/build-support/kernel/make-initrd-ng.nix
···+compressorName = fullCommand: builtins.elemAt (builtins.match "([^ ]*/)?([^ ]+).*" fullCommand) 1;+{ stdenvNoCC, perl, cpio, ubootTools, lib, pkgsBuildHost, makeInitrdNGTool, patchelf, runCommand, glibc+# This can also be a function which takes a package set and returns the path to the compressor,+else if ! builtins.hasContext compressor && builtins.hasAttr compressor compressors then compressors.${compressor}.executable+, _compressorArgsReal ? if compressorArgs == null then _compressorMeta.defaultArgs or [] else compressorArgs+# See https://gitlab.denx.de/u-boot/u-boot/-/blob/9bfb567e5f1bfe7de8eb41f8c6d00f49d2b9a426/common/image.c#L81-106 for a list.+# See https://gitlab.denx.de/u-boot/u-boot/-/blob/9bfb567e5f1bfe7de8eb41f8c6d00f49d2b9a426/common/image.c#L195-204 for a list.+contents = lib.concatMapStringsSep "\n" ({ object, symlink, ... }: "${object}\n${if symlink == null then "" else symlink}") contents + "\n";+(cd root && find * .[^.*] -print0 | sort -z | cpio -o -H newc -R +0:+0 --reproducible --null | eval -- $compress >> "$out/initrd")
+5
pkgs/build-support/kernel/make-initrd-ng/Cargo.lock
+5
pkgs/build-support/kernel/make-initrd-ng/Cargo.lock
+9
pkgs/build-support/kernel/make-initrd-ng/Cargo.toml
+9
pkgs/build-support/kernel/make-initrd-ng/Cargo.toml
+79
pkgs/build-support/kernel/make-initrd-ng/README.md
+79
pkgs/build-support/kernel/make-initrd-ng/README.md
···
+208
pkgs/build-support/kernel/make-initrd-ng/src/main.rs
+208
pkgs/build-support/kernel/make-initrd-ng/src/main.rs
···+Err(Error::new(ErrorKind::Other, format!("failed: patchelf {:?} {:?}", OsStr::new(&mode), OsStr::new(&path))))+let rpath = rpath_string.trim().split(":").map(|p| Box::<Path>::from(Path::new(p))).collect::<Vec<_>>();
+1
-1
pkgs/os-specific/linux/systemd/default.nix
+1
-1
pkgs/os-specific/linux/systemd/default.nix
+6
pkgs/top-level/all-packages.nix
+6
pkgs/top-level/all-packages.nix
······makeInitrd = callPackage ../build-support/kernel/make-initrd.nix; # Args intentionally left out