Skip to content

Commit c48efd1

Browse files
committed
fix(zfs): address latestCompatibleLinuxPackages deprecation
1 parent c84b452 commit c48efd1

File tree

2 files changed

+13
-2
lines changed

2 files changed

+13
-2
lines changed

machines/pc/configuration.nix

+6-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
1-
{config, ...}: {
1+
{
2+
config,
3+
latestZfsCompatibleKernel,
4+
...
5+
}: {
26
imports = [
37
./hardware-configuration.nix
48
../base.nix
@@ -50,7 +54,7 @@
5054
boot.loader.efi.canTouchEfiVariables = false;
5155

5256
# Linux kernel configuration
53-
boot.kernelPackages = config.boot.zfs.package.latestCompatibleLinuxPackages;
57+
boot.kernelPackages = latestZfsCompatibleKernel;
5458

5559
networking.hostName = "nixos-pc";
5660
networking.hostId = "4090d928";

modules/system/filesystem.nix

+7
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
lib,
33
config,
4+
pkgs,
45
...
56
}: let
67
cfg = config.modules.filesystem;
@@ -14,6 +15,12 @@ in {
1415
};
1516

1617
config = lib.mkIf cfg.enable (lib.mkMerge [
18+
{
19+
# Define latestZfsCompatibleKernel argument
20+
# NOTE: Update this according to https://github.com/openzfs/zfs/releases
21+
_module.args.latestZfsCompatibleKernel = pkgs.linuxPackages_6_12;
22+
}
23+
1724
(lib.mkIf (cfg.fsType == "btrfs") {
1825
fileSystems."/home" = {
1926
device = "/dev/mapper/enc";

0 commit comments

Comments
 (0)