Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
39 lines
862 B
Nix
39 lines
862 B
Nix
{
|
|
config,
|
|
lib,
|
|
pkgs,
|
|
...
|
|
}:
|
|
|
|
with lib;
|
|
|
|
let
|
|
|
|
inInitrd = config.boot.initrd.supportedFilesystems.xfs or false;
|
|
|
|
in
|
|
|
|
{
|
|
config = mkIf (config.boot.supportedFilesystems.xfs or false) {
|
|
|
|
system.fsPackages = [ pkgs.xfsprogs.bin ];
|
|
|
|
boot.initrd.availableKernelModules = mkIf inInitrd [
|
|
"xfs"
|
|
"crc32c"
|
|
];
|
|
|
|
boot.initrd.extraUtilsCommands = mkIf (inInitrd && !config.boot.initrd.systemd.enable) ''
|
|
copy_bin_and_libs ${pkgs.xfsprogs.bin}/bin/fsck.xfs
|
|
copy_bin_and_libs ${pkgs.xfsprogs.bin}/bin/xfs_repair
|
|
'';
|
|
|
|
# Trick just to set 'sh' after the extraUtils nuke-refs.
|
|
boot.initrd.extraUtilsCommandsTest = mkIf (inInitrd && !config.boot.initrd.systemd.enable) ''
|
|
sed -i -e 's,^#!.*,#!'$out/bin/sh, $out/bin/fsck.xfs
|
|
'';
|
|
|
|
boot.initrd.systemd.initrdBin = mkIf inInitrd [ pkgs.xfsprogs.bin ];
|
|
};
|
|
}
|