2014-07-30 10:49:31 +02:00
|
|
|
{ config, lib, pkgs, ... }:
|
|
|
|
|
|
|
|
with lib;
|
|
|
|
|
|
|
|
let
|
|
|
|
|
2024-02-18 23:35:17 +01:00
|
|
|
inInitrd = config.boot.initrd.supportedFilesystems.cifs or false;
|
2014-07-30 10:49:31 +02:00
|
|
|
|
|
|
|
in
|
|
|
|
|
|
|
|
{
|
|
|
|
config = {
|
|
|
|
|
2024-02-18 23:35:17 +01:00
|
|
|
system.fsPackages = mkIf (config.boot.supportedFilesystems.cifs or false) [ pkgs.cifs-utils ];
|
2014-07-30 10:49:31 +02:00
|
|
|
|
|
|
|
boot.initrd.availableKernelModules = mkIf inInitrd
|
|
|
|
[ "cifs" "nls_utf8" "hmac" "md4" "ecb" "des_generic" "sha256" ];
|
|
|
|
|
2022-04-16 21:46:32 +02:00
|
|
|
boot.initrd.extraUtilsCommands = mkIf (inInitrd && !config.boot.initrd.systemd.enable)
|
2014-07-30 10:49:31 +02:00
|
|
|
''
|
2016-08-22 17:20:44 +02:00
|
|
|
copy_bin_and_libs ${pkgs.cifs-utils}/sbin/mount.cifs
|
2014-07-30 10:49:31 +02:00
|
|
|
'';
|
|
|
|
|
2023-10-20 03:09:12 +02:00
|
|
|
boot.initrd.systemd.extraBin."mount.cifs" = mkIf inInitrd "${pkgs.cifs-utils}/sbin/mount.cifs";
|
|
|
|
|
2014-07-30 10:49:31 +02:00
|
|
|
};
|
|
|
|
}
|