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

18
flake.lock generated
View file

@ -71,7 +71,8 @@
"inputs": {
"doomemacs": "doomemacs",
"emacs-overlay": "emacs-overlay",
"nixpkgs": "nixpkgs"
"nixpkgs": "nixpkgs",
"systems": "systems_2"
}
},
"systems": {
@ -88,6 +89,21 @@
"repo": "default",
"type": "github"
}
},
"systems_2": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
}
},
"root": "root",

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