summary refs log tree commit diff
path: root/nixos
diff options
context:
space:
mode:
authorgithub-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>2022-04-04 18:01:27 +0000
committerGitHub <noreply@github.com>2022-04-04 18:01:27 +0000
commit5844b1c2fa38d4392063ccea9c75b13f28652b82 (patch)
tree35a0e8d5e1820a859b85c09f6a86d99f815aedf7 /nixos
parentc1ef87e8d02273c9814444cedb3bac6669e07834 (diff)
parentc8151fe657612a32307ed17fdc7db2ee52157e69 (diff)
downloadnixpkgs-5844b1c2fa38d4392063ccea9c75b13f28652b82.tar
nixpkgs-5844b1c2fa38d4392063ccea9c75b13f28652b82.tar.gz
nixpkgs-5844b1c2fa38d4392063ccea9c75b13f28652b82.tar.bz2
nixpkgs-5844b1c2fa38d4392063ccea9c75b13f28652b82.tar.lz
nixpkgs-5844b1c2fa38d4392063ccea9c75b13f28652b82.tar.xz
nixpkgs-5844b1c2fa38d4392063ccea9c75b13f28652b82.tar.zst
nixpkgs-5844b1c2fa38d4392063ccea9c75b13f28652b82.zip
Merge master into staging-next
Diffstat (limited to 'nixos')
-rw-r--r--nixos/modules/services/misc/ethminer.nix2
-rw-r--r--nixos/modules/system/boot/systemd/initrd.nix24
2 files changed, 21 insertions, 5 deletions
diff --git a/nixos/modules/services/misc/ethminer.nix b/nixos/modules/services/misc/ethminer.nix
index a6c52e39499..253476d1a23 100644
--- a/nixos/modules/services/misc/ethminer.nix
+++ b/nixos/modules/services/misc/ethminer.nix
@@ -97,7 +97,7 @@ in
         Restart = "always";
       };
 
-      environment = {
+      environment = mkIf (cfg.toolkit == "cuda") {
         LD_LIBRARY_PATH = "${config.boot.kernelPackages.nvidia_x11}/lib";
       };
 
diff --git a/nixos/modules/system/boot/systemd/initrd.nix b/nixos/modules/system/boot/systemd/initrd.nix
index 36a14d7a825..c87cddc6914 100644
--- a/nixos/modules/system/boot/systemd/initrd.nix
+++ b/nixos/modules/system/boot/systemd/initrd.nix
@@ -150,7 +150,7 @@ in {
     '';
 
     package = (mkPackageOption pkgs "systemd" {
-      default = "systemdMinimal";
+      default = "systemdStage1";
     }) // {
       visible = false;
     };
@@ -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"