Skip to content

Commit

Permalink
Use nix-systems to allow customization of the target platforms
Browse files Browse the repository at this point in the history
  • Loading branch information
akirak committed Jul 28, 2023
1 parent 8562095 commit 61dd695
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 11 deletions.
10 changes: 3 additions & 7 deletions elixir-phoenix/flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,16 @@
inputs.nixpkgs.follows = "nixpkgs";
inputs.flake-utils.follows = "flake-utils";
};
inputs.systems.url = "github:nix-systems/default";

outputs = {
self,
nixpkgs,
systems,
flake-utils,
pre-commit-hooks,
}:
flake-utils.lib.eachSystem [
# TODO: Configure your supported system here.
"x86_64-linux"
"aarch64-linux"
"i686-linux"
"x86_64-darwin"
]
flake-utils.lib.eachSystem (import systems)
(
system: let
pkgs = import nixpkgs {
Expand Down
5 changes: 4 additions & 1 deletion elixir/flake.nix
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
{
inputs.systems.url = "github:nix-systems/default";

outputs = {
self,
nixpkgs,
systems,
flake-utils,
}:
flake-utils.lib.eachDefaultSystem
flake-utils.lib.eachSystem (import systems)
(
system: let
pkgs = import nixpkgs {
Expand Down
5 changes: 4 additions & 1 deletion minimal/flake.nix
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
{
inputs.systems.url = "github:nix-systems/default";

outputs = {
self,
nixpkgs,
flake-utils,
systems,
}:
flake-utils.lib.eachDefaultSystem
flake-utils.lib.eachSystem (import systems)
(system: let
pkgs = import nixpkgs {
inherit system;
Expand Down
4 changes: 3 additions & 1 deletion node-typescript/flake.nix
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
{
# Override nixpkgs to use the latest set of node packages
inputs.nixpkgs.url = "github:NixOS/nixpkgs/master";
inputs.systems.url = "github:nix-systems/default";

outputs = {
self,
nixpkgs,
flake-utils,
systems,
}:
flake-utils.lib.eachDefaultSystem
flake-utils.lib.eachSystem (import systems)
(system: let
pkgs = import nixpkgs {
inherit system;
Expand Down
4 changes: 3 additions & 1 deletion pre-commit/flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,16 @@
inputs.nixpkgs.follows = "nixpkgs";
inputs.flake-utils.follows = "flake-utils";
};
inputs.systems.url = "github:nix-systems/default";

outputs = {
self,
nixpkgs,
flake-utils,
systems,
pre-commit-hooks,
}:
flake-utils.lib.eachDefaultSystem
flake-utils.lib.eachSystem (import systems)
(system: let
pkgs = import nixpkgs {inherit system;};
in rec {
Expand Down

0 comments on commit 61dd695

Please sign in to comment.