Skip to content

Commit

Permalink
flake.nix: refactor to use nix-systems pattern
Browse files Browse the repository at this point in the history
  • Loading branch information
rgoulter committed Jun 4, 2024
1 parent a5d7a21 commit 80c0127
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 6 deletions.
18 changes: 17 additions & 1 deletion flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 3 additions & 5 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,17 @@
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
home-manager.url = "github:nix-community/home-manager";
systems.url = "github:nix-systems/default";
};

outputs = {
self,
home-manager,
nixpkgs,
systems,
...
}: let
systems = [
"x86_64-linux"
"x86_64-darwin"
];
forAllSystems = f: nixpkgs.lib.genAttrs systems (system: f system);
forAllSystems = f: nixpkgs.lib.genAttrs (import systems) (system: f system);
in {
devShells = forAllSystems (system: let
pkgs = nixpkgs.legacyPackages.${system};
Expand Down

0 comments on commit 80c0127

Please sign in to comment.