Skip to content

Commit

Permalink
chore(flake): inherit lib functions
Browse files Browse the repository at this point in the history
Signed-off-by: Sefa Eyeoglu <[email protected]>
  • Loading branch information
Scrumplex committed Jan 3, 2024
1 parent 0d6fa3b commit 04bb80f
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,13 @@
nixpkgs,
self,
}: let
inherit (builtins) mapAttrs;
inherit (nixpkgs.lib) genAttrs;

systems = ["x86_64-linux" "aarch64-linux"];

forSystem = system: fn: fn nixpkgs.legacyPackages.${system};
forAllSystems = fn: nixpkgs.lib.genAttrs systems (system: forSystem system fn);

inherit (nixpkgs) lib;
forAllSystems = fn: genAttrs systems (system: forSystem system fn);

mkSources = final:
import ./_sources/generated.nix {
Expand All @@ -39,8 +40,8 @@
packages = forAllSystems (pkgs: self.overlays.default pkgs pkgs);

overlays = {
default = final: prev: lib.mapAttrs (mkSourceOverride prev) (mkSources final);
unstripped = final: prev: lib.mapAttrs (mkDebugOverride prev) (mkSources final);
default = final: prev: mapAttrs (mkSourceOverride prev) (mkSources final);
unstripped = final: prev: mapAttrs (mkDebugOverride prev) (mkSources final);
};

nixosModules.nixpkgs-xr = {
Expand Down

0 comments on commit 04bb80f

Please sign in to comment.