genSystems function
This commit is contained in:
parent
0ada96086f
commit
a00f3583af
25
flake.lock
Normal file
25
flake.lock
Normal file
|
@ -0,0 +1,25 @@
|
|||
{
|
||||
"nodes": {
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1716715802,
|
||||
"narHash": "sha256-usk0vE7VlxPX8jOavrtpOqphdfqEQpf9lgedlY/r66c=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "e2dd4e18cc1c7314e24154331bae07df76eb582f",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"id": "nixpkgs",
|
||||
"type": "indirect"
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"nixpkgs": "nixpkgs"
|
||||
}
|
||||
}
|
||||
},
|
||||
"root": "root",
|
||||
"version": 7
|
||||
}
|
12
flake.nix
Normal file
12
flake.nix
Normal file
|
@ -0,0 +1,12 @@
|
|||
{
|
||||
outputs = { self, nixpkgs }: {
|
||||
lib = rec {
|
||||
mergeFlakes = flakes: nixpkgs.lib.attrsets.foldAttrs (prev: i: prev // i) {} flakes;
|
||||
genSystems = (systems: f:
|
||||
(mergeFlakes (map (system:
|
||||
builtins.mapAttrs (k: v: { "${system}" = v; }) (f (import nixpkgs { inherit system; }))
|
||||
) systems))
|
||||
);
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Reference in New Issue
Block a user