diff options
author | Lassulus <github@lassul.us> | 2022-04-04 18:25:55 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-04-04 18:25:55 +0100 |
commit | 5083d22ec5ba76b1eef4feec5320a3a9e8d68aa1 (patch) | |
tree | 752670481faab84648326dfcfa9a54edf1af4144 /nixos | |
parent | aedd6ccfc6db9c1e2793f217d6be4c0f2586af8c (diff) | |
parent | 75ece4eb82a59aa78721d35b2f0bbf8285e1ee56 (diff) |
Merge pull request #167167 from helsinki-systems/feat/systemd-stage-1-less-systemd-files
nixos/stage-1-systemd: Limit files to the bare necessities
Diffstat (limited to 'nixos')
-rw-r--r-- | nixos/modules/system/boot/systemd/initrd.nix | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/nixos/modules/system/boot/systemd/initrd.nix b/nixos/modules/system/boot/systemd/initrd.nix index d37bdbbcee56d..c87cddc6914cd 100644 --- a/nixos/modules/system/boot/systemd/initrd.nix +++ b/nixos/modules/system/boot/systemd/initrd.nix @@ -367,12 +367,28 @@ in { "/sbin".source = "${initrdBinEnv}/sbin"; "/etc/sysctl.d/nixos.conf".text = "kernel.modprobe = /sbin/modprobe"; + "/etc/modprobe.d/systemd.conf".source = "${cfg.package}/lib/modprobe.d/systemd.conf"; }; storePaths = [ - # TODO: Limit this to the bare necessities - "${cfg.package}/lib" - + # systemd tooling + "${cfg.package}/lib/systemd/systemd-fsck" + "${cfg.package}/lib/systemd/systemd-growfs" + "${cfg.package}/lib/systemd/systemd-hibernate-resume" + "${cfg.package}/lib/systemd/systemd-journald" + "${cfg.package}/lib/systemd/systemd-makefs" + "${cfg.package}/lib/systemd/systemd-modules-load" + "${cfg.package}/lib/systemd/systemd-remount-fs" + "${cfg.package}/lib/systemd/systemd-sulogin-shell" + "${cfg.package}/lib/systemd/systemd-sysctl" + "${cfg.package}/lib/systemd/systemd-udevd" + "${cfg.package}/lib/systemd/systemd-vconsole-setup" + + # additional systemd directories + "${cfg.package}/lib/systemd/system-generators" + "${cfg.package}/lib/udev" + + # utilities needed by systemd "${cfg.package.util-linux}/bin/mount" "${cfg.package.util-linux}/bin/umount" "${cfg.package.util-linux}/bin/sulogin" |