From 82d3c063a373815b753d66cd62ce4480f8d101b9 Mon Sep 17 00:00:00 2001 From: Adam Joseph Date: Sun, 2 Oct 2022 19:03:43 -0700 Subject: [PATCH] nixos/modules/profiles/base.nix: omit zfs if unavailable The `boot.zfs.enabled` option is marked `readOnly`, so this is the only way to successfully build a NixOS installer image for platforms that zfs does not build for. Co-authored-by: Alyssa Ross --- nixos/modules/profiles/base.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/nixos/modules/profiles/base.nix b/nixos/modules/profiles/base.nix index 33dd80d7c5abda3..685008b09b044b3 100644 --- a/nixos/modules/profiles/base.nix +++ b/nixos/modules/profiles/base.nix @@ -51,7 +51,9 @@ ]; # Include support for various filesystems. - boot.supportedFilesystems = [ "btrfs" "reiserfs" "vfat" "f2fs" "xfs" "zfs" "ntfs" "cifs" ]; + boot.supportedFilesystems = + [ "btrfs" "reiserfs" "vfat" "f2fs" "xfs" "ntfs" "cifs" ] ++ + lib.optional (lib.meta.availableOn pkgs.stdenv.hostPlatform config.boot.zfs.package) "zfs"; # Configure host id for ZFS to work networking.hostId = lib.mkDefault "8425e349";