summaryrefslogtreecommitdiff
path: root/flake.nix
diff options
context:
space:
mode:
authorseth <[email protected]>2024-07-06 04:05:02 -0400
committerseth <[email protected]>2024-07-06 04:12:41 -0400
commitece1831de7c94357943b7a999acaf99b7fb80fb7 (patch)
tree5ea7f4a4e2962045adf419fda2ea4a9b1b48ae90 /flake.nix
parentbd3c8d11101fc2b90e37d60d99a9e544e69f194d (diff)
flake: simplify
Diffstat (limited to 'flake.nix')
-rw-r--r--flake.nix15
1 files changed, 7 insertions, 8 deletions
diff --git a/flake.nix b/flake.nix
index ae55509..fde7c88 100644
--- a/flake.nix
+++ b/flake.nix
@@ -13,6 +13,7 @@
outputs =
{ nixpkgs, ... }:
let
+ inherit (nixpkgs) lib;
systems = [
"x86_64-linux"
"aarch64-linux"
@@ -20,17 +21,15 @@
"aarch64-darwin"
];
- forAllSystems = fn: nixpkgs.lib.genAttrs systems (sys: fn nixpkgs.legacyPackages.${sys});
+ forAllSystems = lib.genAttrs systems;
+ nixpkgsFor = forAllSystems (system: nixpkgs.legacyPackages.${system});
in
{
packages = forAllSystems (
- {
- lib,
- pkgs,
- system,
- ...
- }:
+ system:
let
+ pkgs = nixpkgsFor.${system};
+
/*
this filters out packages that may be broken or not supported
on the current system. packages that have no `broken` or `platforms`
@@ -44,7 +43,7 @@
pkgs' // { default = pkgs'.treefetch; }
);
- formatter = forAllSystems (pkgs: pkgs.nixfmt-rfc-style);
+ formatter = forAllSystems (system: nixpkgsFor.${system}.nixfmt-rfc-style);
templates = import ./templates;
};