-
-
Save firestack/14d29bcd8175f2f3d341be9a1b062929 to your computer and use it in GitHub Desktop.
bcachefs support (needs fixing)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ config, lib, pkgs, ... }: | |
with lib; | |
let | |
kernel = { | |
date = "2021-10-01"; | |
commit = "4114ced1db46"; | |
hash = "05rnr7d704cq60k4yfw070ph9z6zjkrl68c07rca9cwx6km34zqf"; | |
version = "5.13"; | |
}; | |
# at the moment tools depends on the following: https://github.com/numtide/nix-filter | |
# somehow this needs to be installed | |
tools = { | |
# get latest | |
date = ; | |
rev = ; | |
hash = ; | |
}; | |
nixkernel = "linux_5_14"; | |
in | |
{ | |
disabledModules = [ "tasks/filesystems/zfs.nix" ]; | |
nixpkgs.overlays = [ | |
(self: oldpkgs: { | |
linux_testing_bcachefs = oldpkgs.linux_testing_bcachefs.override { | |
doCheck = false; | |
argsOverride = rec { | |
version = "5.13.19"; | |
modDirVersion = "5.13.19"; | |
src = oldpkgs.fetchurl { | |
url = "mirror://kernel/linux/kernel/v5.x/linux-${version}.tar.xz"; | |
sha256 = "0yxbcd1k4l4cmdn0hzcck4s0yvhvq9fpwp120dv9cz4i9rrfqxz8"; | |
}; | |
}; | |
kernelPatches = oldpkgs.linux_testing_bcachefs.kernelPatches ++ [( | |
rec { | |
name = "bcachefs-${kernel.date}"; | |
patch = oldpkgs.fetchurl { | |
name = "bcachefs-${kernel.commit}-v${kernel.version}.patch"; | |
url = "https://raw.githubusercontent.com/YellowOnion/bcachefs-patches/master/v${kernel.version}/bcachefs-v${kernel.version}-${kernel.date}-${kernel.commit}.patch"; | |
sha256 = kernel.hash; | |
}; | |
})]; | |
dontStrip = true; | |
extraConfig = "BCACHEFS_FS m"; | |
}; | |
bcachefs-tools = pkgs.callPackage (pkgs.fetchgit { | |
# github may be better? idek, thinking about bandwidth and costs | |
url = "https://evilpiepirate.org/git/bcachefs-tools.git"; | |
rev = tools.commit; | |
sha256 = tools.hash; | |
}) { | |
filter = filter.lib;#the filter library we need | |
lastModified = tools.date; | |
}; | |
})]; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment