diff options
author | github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> | 2023-10-30 18:01:02 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-10-30 18:01:02 +0000 |
commit | 931938d1df438b671516809126e433b9793f0106 (patch) | |
tree | 6ea73609039691bd71d8fcca7a6b970fd475ddb5 /nixos/modules/tasks/filesystems | |
parent | 7f11b9b46bf4693acc2d94a04b2b59ea239c4cc2 (diff) | |
parent | fe1e9d524b7ac9fac5f8be3ea2a7d177a5a4b4dc (diff) | |
download | nixlib-931938d1df438b671516809126e433b9793f0106.tar nixlib-931938d1df438b671516809126e433b9793f0106.tar.gz nixlib-931938d1df438b671516809126e433b9793f0106.tar.bz2 nixlib-931938d1df438b671516809126e433b9793f0106.tar.lz nixlib-931938d1df438b671516809126e433b9793f0106.tar.xz nixlib-931938d1df438b671516809126e433b9793f0106.tar.zst nixlib-931938d1df438b671516809126e433b9793f0106.zip |
Merge master into staging-next
Diffstat (limited to 'nixos/modules/tasks/filesystems')
-rw-r--r-- | nixos/modules/tasks/filesystems/bcachefs.nix | 4 | ||||
-rw-r--r-- | nixos/modules/tasks/filesystems/zfs.nix | 12 |
2 files changed, 8 insertions, 8 deletions
diff --git a/nixos/modules/tasks/filesystems/bcachefs.nix b/nixos/modules/tasks/filesystems/bcachefs.nix index 40305a2e66aa..af7ba7aa6a0f 100644 --- a/nixos/modules/tasks/filesystems/bcachefs.nix +++ b/nixos/modules/tasks/filesystems/bcachefs.nix @@ -117,11 +117,11 @@ in copy_bin_and_libs ${pkgs.bcachefs-tools}/bin/bcachefs copy_bin_and_libs ${pkgs.bcachefs-tools}/bin/mount.bcachefs ''; - boot.initrd.extraUtilsCommandsTest = '' + boot.initrd.extraUtilsCommandsTest = lib.mkIf (!config.boot.initrd.systemd.enable) '' $out/bin/bcachefs version ''; - boot.initrd.postDeviceCommands = commonFunctions + concatStrings (mapAttrsToList openCommand bootFs); + boot.initrd.postDeviceCommands = lib.mkIf (!config.boot.initrd.systemd.enable) (commonFunctions + concatStrings (mapAttrsToList openCommand bootFs)); boot.initrd.systemd.services = lib.mapAttrs' (mkUnits "/sysroot") bootFs; }) diff --git a/nixos/modules/tasks/filesystems/zfs.nix b/nixos/modules/tasks/filesystems/zfs.nix index 082634ec9d01..4b6a5b6c12c1 100644 --- a/nixos/modules/tasks/filesystems/zfs.nix +++ b/nixos/modules/tasks/filesystems/zfs.nix @@ -584,17 +584,17 @@ in boot.initrd = mkIf inInitrd { kernelModules = [ "zfs" ] ++ optional (!cfgZfs.enableUnstable) "spl"; extraUtilsCommands = - '' + mkIf (!config.boot.initrd.systemd.enable) '' copy_bin_and_libs ${cfgZfs.package}/sbin/zfs copy_bin_and_libs ${cfgZfs.package}/sbin/zdb copy_bin_and_libs ${cfgZfs.package}/sbin/zpool ''; - extraUtilsCommandsTest = mkIf inInitrd - '' + extraUtilsCommandsTest = + mkIf (!config.boot.initrd.systemd.enable) '' $out/bin/zfs --help >/dev/null 2>&1 $out/bin/zpool --help >/dev/null 2>&1 ''; - postDeviceCommands = concatStringsSep "\n" (['' + postDeviceCommands = mkIf (!config.boot.initrd.systemd.enable) (concatStringsSep "\n" (['' ZFS_FORCE="${optionalString cfgZfs.forceImportRoot "-f"}" ''] ++ [(importLib { # See comments at importLib definition. @@ -623,10 +623,10 @@ in else concatMapStrings (fs: '' zfs load-key -- ${escapeShellArg fs} '') (filter (x: datasetToPool x == pool) cfgZfs.requestEncryptionCredentials)} - '') rootPools)); + '') rootPools))); # Systemd in stage 1 - systemd = { + systemd = mkIf config.boot.initrd.systemd.enable { packages = [cfgZfs.package]; services = listToAttrs (map (pool: createImportService { inherit pool; |