Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions nixos/modules/security/pam.nix
Original file line number Diff line number Diff line change
Expand Up @@ -1458,9 +1458,9 @@ in
'';
}
{
assertion = config.security.pam.zfs.enable -> (config.boot.zfs.enabled || config.boot.zfs.enableUnstable);
assertion = config.security.pam.zfs.enable -> config.boot.zfs.enabled;
message = ''
`security.pam.zfs.enable` requires enabling ZFS (`boot.zfs.enabled` or `boot.zfs.enableUnstable`).
`security.pam.zfs.enable` requires enabling ZFS (`boot.zfs.enabled`).
'';
}
{
Expand Down
20 changes: 4 additions & 16 deletions nixos/modules/tasks/filesystems/zfs.nix
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,7 @@ in

imports = [
(mkRemovedOptionModule [ "boot" "zfs" "enableLegacyCrypto" ] "The corresponding package was removed from nixpkgs.")
(mkRemovedOptionModule [ "boot" "zfs" "enableUnstable" ] "Instead set `boot.zfs.package = pkgs.zfs_unstable;`")
];

###### interface
Expand All @@ -219,9 +220,9 @@ in
boot.zfs = {
package = mkOption {
type = types.package;
default = if cfgZfs.enableUnstable then pkgs.zfsUnstable else pkgs.zfs;
defaultText = literalExpression "if zfsUnstable is enabled then pkgs.zfsUnstable else pkgs.zfs";
description = lib.mdDoc "Configured ZFS userland tools package, use `pkgs.zfsUnstable` if you want to track the latest staging ZFS branch.";
default = pkgs.zfs;
defaultText = literalExpression "pkgs.zfs";
description = lib.mdDoc "Configured ZFS userland tools package, use `pkgs.zfs_unstable` if you want to track the latest staging ZFS branch.";
};

modulePackage = mkOption {
Expand All @@ -239,19 +240,6 @@ in
description = lib.mdDoc "True if ZFS filesystem support is enabled";
};

enableUnstable = mkOption {
type = types.bool;
default = false;
description = lib.mdDoc ''
Use the unstable zfs package. This might be an option, if the latest
kernel is not yet supported by a published release of ZFS. Enabling
this option will install a development version of ZFS on Linux. The
version will have already passed an extensive test suite, but it is
more likely to hit an undiscovered bug compared to running a released
version of ZFS on Linux.
'';
};

allowHibernation = mkOption {
type = types.bool;
default = false;
Expand Down
18 changes: 9 additions & 9 deletions nixos/tests/zfs.nix
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@ with import ../lib/testing-python.nix { inherit system pkgs; };

let

makeZfsTest = name:
makeZfsTest =
{ kernelPackages
, enableSystemdStage1 ? false
, zfsPackage
, extraTest ? ""
}:
makeTest {
name = "zfs-" + name;
name = zfsPackage.kernelModuleAttribute;
meta = with pkgs.lib.maintainers; {
maintainers = [ elvishjerricco ];
};
Expand Down Expand Up @@ -192,23 +192,23 @@ let
in {

# maintainer: @raitobezarius
series_2_1 = makeZfsTest "2.1-series" {
series_2_1 = makeZfsTest {
zfsPackage = pkgs.zfs_2_1;
kernelPackages = pkgs.linuxPackages;
};

stable = makeZfsTest "stable" {
zfsPackage = pkgs.zfsStable;
series_2_2 = makeZfsTest {
zfsPackage = pkgs.zfs_2_2;
kernelPackages = pkgs.linuxPackages;
};

unstable = makeZfsTest "unstable" rec {
zfsPackage = pkgs.zfsUnstable;
unstable = makeZfsTest rec {
zfsPackage = pkgs.zfs_unstable;
kernelPackages = zfsPackage.latestCompatibleLinuxPackages;
};

unstableWithSystemdStage1 = makeZfsTest "unstable" rec {
zfsPackage = pkgs.zfsUnstable;
unstableWithSystemdStage1 = makeZfsTest rec {
zfsPackage = pkgs.zfs_unstable;
kernelPackages = zfsPackage.latestCompatibleLinuxPackages;
enableSystemdStage1 = true;
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ in
callPackage ./generic.nix args {
# You have to ensure that in `pkgs/top-level/linux-kernels.nix`
# this attribute is the correct one for this package.
kernelModuleAttribute = "zfs";
kernelModuleAttribute = "zfs_2_2";
# check the release notes for compatible kernels
kernelCompatible = kernel.kernelOlder "6.8";

Expand All @@ -23,7 +23,7 @@ callPackage ./generic.nix args {

tests = [
nixosTests.zfs.installer
nixosTests.zfs.stable
nixosTests.zfs.series_2_2
];

hash = "sha256-Bzkow15OitUUQ+mTYhCXgTrQl+ao/B4feleHY/rSSjg=";
Expand Down
4 changes: 2 additions & 2 deletions pkgs/os-specific/linux/zfs/generic.nix
Original file line number Diff line number Diff line change
Expand Up @@ -234,8 +234,8 @@ let

inherit maintainers;
mainProgram = "zfs";
# If your Linux kernel version is not yet supported by zfs, try zfsUnstable.
# On NixOS set the option boot.zfs.enableUnstable.
# If your Linux kernel version is not yet supported by zfs, try zfs_unstable.
# On NixOS set the option `boot.zfs.package = pkgs.zfs_unstable`.
broken = buildKernel && (kernelCompatible != null) && !kernelCompatible;
};
};
Expand Down
2 changes: 1 addition & 1 deletion pkgs/os-specific/linux/zfs/unstable.nix
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ in
callPackage ./generic.nix args {
# You have to ensure that in `pkgs/top-level/linux-kernels.nix`
# this attribute is the correct one for this package.
kernelModuleAttribute = "zfsUnstable";
kernelModuleAttribute = "zfs_unstable";
# check the release notes for compatible kernels
kernelCompatible = kernel.kernelOlder "6.9";

Expand Down
2 changes: 2 additions & 0 deletions pkgs/top-level/aliases.nix
Original file line number Diff line number Diff line change
Expand Up @@ -1211,6 +1211,8 @@ mapAliases ({
### Z ###

zabbix40 = throw "'zabbix40' has been removed as it has reached end of life"; # Added 2024-01-07
zfsStable = zfs; # Added 2024-02-26
zfsUnstable = zfs_unstable; # Added 2024-02-26
zinc = zincsearch; # Added 2023-05-28
zkg = throw "'zkg' has been replaced by 'zeek'";
zq = zed.overrideAttrs (old: { meta = old.meta // { mainProgram = "zq"; }; }); # Added 2023-02-06
Expand Down
26 changes: 16 additions & 10 deletions pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -28726,16 +28726,22 @@ with pkgs;

zenmonitor = callPackage ../os-specific/linux/zenmonitor { };

zfs_2_1 = callPackage ../os-specific/linux/zfs/2_1.nix {
configFile = "user";
};
zfsStable = callPackage ../os-specific/linux/zfs/stable.nix {
configFile = "user";
};
zfsUnstable = callPackage ../os-specific/linux/zfs/unstable.nix {
configFile = "user";
};
zfs = zfsStable;
inherit
({
zfs_2_1 = callPackage ../os-specific/linux/zfs/2_1.nix {
configFile = "user";
};
zfs_2_2 = callPackage ../os-specific/linux/zfs/2_2.nix {
configFile = "user";
};
zfs_unstable = callPackage ../os-specific/linux/zfs/unstable.nix {
configFile = "user";
};
})
zfs_2_1
zfs_2_2
zfs_unstable;
zfs = zfs_2_2;

### DATA

Expand Down
6 changes: 3 additions & 3 deletions pkgs/top-level/linux-kernels.nix
Original file line number Diff line number Diff line change
Expand Up @@ -565,15 +565,15 @@ in {
configFile = "kernel";
inherit pkgs kernel;
};
zfsStable = callPackage ../os-specific/linux/zfs/stable.nix {
zfs_2_2 = callPackage ../os-specific/linux/zfs/2_2.nix {
configFile = "kernel";
inherit pkgs kernel;
};
zfsUnstable = callPackage ../os-specific/linux/zfs/unstable.nix {
zfs_unstable = callPackage ../os-specific/linux/zfs/unstable.nix {
configFile = "kernel";
inherit pkgs kernel;
};
zfs = zfsStable;
zfs = zfs_2_2;

can-isotp = callPackage ../os-specific/linux/can-isotp { };

Expand Down