Commit 959c76a7aeb0

Vincent Demeester <vincent@sbr.pm>
2025-10-29 10:32:39
flakes: fix githubActionsMatrix
This should be safer to use, in doesn't use nixpkgs.system, and it also filter if a nixosConfiguration has no system in specialArgs. Signed-off-by: Vincent Demeester <vincent@sbr.pm>
1 parent 22f9efc
Changed files (1)
flake.nix
@@ -36,10 +36,16 @@
         checks = inputs.nixpkgs.lib.getAttrs [ "x86_64-linux" ] self.packages;
       };
       githubActionsMatrix = builtins.toJSON (
-        inputs.nixpkgs.lib.mapAttrsToList (name: value: {
-          inherit name;
-          arch = value.config.nixpkgs.system;
-        }) self.nixosConfigurations
+        inputs.nixpkgs.lib.mapAttrsToList
+          (name: value: {
+            inherit name;
+            arch = value._module.specialArgs.system;
+          })
+          (
+            inputs.nixpkgs.lib.attrsets.filterAttrs (
+              _: config: builtins.hasAttr "system" config._module.specialArgs
+            ) self.nixosConfigurations
+          )
       );
       # Standalone home configurations
       # FIXME set this up