Skip to content

Commit

Permalink
nixos/modules/profiles/base.nix: omit zfs if unavailable
Browse files Browse the repository at this point in the history
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 <hi@alyssa.is>
  • Loading branch information
Adam Joseph and alyssais committed Oct 10, 2022
1 parent fe20691 commit 4cdda32
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion nixos/modules/profiles/base.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down

0 comments on commit 4cdda32

Please sign in to comment.