diff --git a/infra/flake-part.nix b/infra/flake-part.nix index 9bfd2269..34bc6e50 100644 --- a/infra/flake-part.nix +++ b/infra/flake-part.nix @@ -14,9 +14,7 @@ let mkOption evalModules filterAttrs - attrsToList - map - listToAttrs + mapAttrs' deepSeq ; inherit (lib.attrsets) genAttrs; @@ -200,27 +198,17 @@ in { pkgs, ... }: { checks = - listToAttrs ( - map ( - { name, value }: - { - name = "nixosConfigurations-${name}"; - value = value.config.system.build.toplevel; - } - ) (attrsToList nixosConfigurations) - ) - // listToAttrs ( - map ( - { name, value }: - { - name = "vmOptions-${name}"; - ## Check that VM options builds/evaluates correctly. `deepSeq e1 - ## e2` evaluates `e1` strictly in depth before returning `e2`. We - ## use this trick because checks need to be derivations, which VM - ## options are not. - value = deepSeq value pkgs.hello; - } - ) (attrsToList vmOptions) - ); + mapAttrs' (name: nixosConfiguration: { + name = "nixosConfigurations-${name}"; + value = nixosConfiguration.config.system.build.toplevel; + }) nixosConfigurations + // mapAttrs' (name: vmOptions: { + name = "vmOptions-${name}"; + ## Check that VM options builds/evaluates correctly. `deepSeq e1 + ## e2` evaluates `e1` strictly in depth before returning `e2`. We + ## use this trick because checks need to be derivations, which VM + ## options are not. + value = deepSeq vmOptions pkgs.hello; + }) vmOptions; }; }