From 765349d3450b1e2b559d0d91bd58978c8effd938 Mon Sep 17 00:00:00 2001 From: Matthias Berndt Date: Fri, 19 May 2023 10:22:45 -0400 Subject: [PATCH] minor refactoring --- nixos/modules/system/boot/stratisroot.nix | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/nixos/modules/system/boot/stratisroot.nix b/nixos/modules/system/boot/stratisroot.nix index f0d1b5475554..241d044db2fe 100644 --- a/nixos/modules/system/boot/stratisroot.nix +++ b/nixos/modules/system/boot/stratisroot.nix @@ -1,11 +1,10 @@ { config, lib, pkgs, utils, ... }: let - types = lib.types; requiredStratisFilesystems = lib.attrsets.filterAttrs (_: x: utils.fsNeededForBoot x && x.stratis.poolUuid != null) config.fileSystems; in { options = {}; - config = lib.mkIf (builtins.length (lib.attrsets.attrValues requiredStratisFilesystems) != 0) { + config = lib.mkIf (requiredStratisFilesystems != {}) { assertions = [ { assertion = config.boot.initrd.systemd.enable;