Use nix-systems

Not hugely important because it only affects our packages, not overlay
or home-manager module, but might as well.
This commit is contained in:
Marien Zwart 2024-05-07 22:47:37 +10:00
parent 0d1f14d15a
commit a435bdc848
No known key found for this signature in database
2 changed files with 23 additions and 4 deletions

View file

@ -15,6 +15,7 @@
{
inputs = {
nixpkgs.url = "nixpkgs";
systems.url = "github:nix-systems/default";
doomemacs = {
url = "github:doomemacs/doomemacs";
flake = false;
@ -29,9 +30,11 @@
};
};
outputs = { doomemacs, nixpkgs, emacs-overlay, ... }: let
systems = [ "x86_64-linux" ];
perSystemPackages = f: nixpkgs.lib.genAttrs systems (system: f nixpkgs.legacyPackages.${system});
outputs = { systems, doomemacs, nixpkgs, emacs-overlay, ... }: let
perSystemPackages = let
eachSystem = nixpkgs.lib.genAttrs (import systems);
in
f: eachSystem (system: f nixpkgs.legacyPackages.${system});
# Hack to avoid pkgs.extend having to instantiate an additional nixpkgs.
#
# We need emacsPackagesFor from the overlay, but neither the overlay itself