Specify the systems through a flake input.

This commit is contained in:
r-vdp 2023-05-31 10:22:20 +02:00
parent 9f51341822
commit 7db9cbff4e
No known key found for this signature in database
3 changed files with 29 additions and 33 deletions

40
flake.lock generated
View file

@ -35,7 +35,9 @@
"nixpkgs": [
"nixpkgs"
],
"systems": "systems"
"systems": [
"systems"
]
},
"locked": {
"lastModified": 1683635384,
@ -69,7 +71,9 @@
},
"flake-utils": {
"inputs": {
"systems": "systems_2"
"systems": [
"systems"
]
},
"locked": {
"lastModified": 1681202837,
@ -172,6 +176,7 @@
"nixpkgs": "nixpkgs",
"pre-commit-hooks": "pre-commit-hooks",
"rust-overlay": "rust-overlay",
"systems": "systems",
"treefmt-nix": "treefmt-nix"
}
},
@ -199,33 +204,16 @@
}
},
"systems": {
"flake": false,
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
"lastModified": 1,
"narHash": "sha256-8wkkYGr1dPSnX9oVMX8D6dTOROXKOYpBTKfriA0sEBI=",
"path": "./systems.nix",
"type": "path"
},
"original": {
"owner": "nix-systems",
"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"
"path": "./systems.nix",
"type": "path"
}
},
"treefmt-nix": {

View file

@ -1,11 +1,19 @@
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
systems = {
url = "path:./systems.nix";
flake = false;
};
flake-utils = {
url = "github:numtide/flake-utils";
inputs.systems.follows = "systems";
};
devshell = {
url = "github:numtide/devshell";
inputs = {
nixpkgs.follows = "nixpkgs";
systems.follows = "systems";
};
};
pre-commit-hooks = {
@ -46,7 +54,7 @@
, devshell
, treefmt-nix
, pre-commit-hooks
,
, ...
}:
{
lib = import ./nix/lib.nix {
@ -60,11 +68,7 @@
};
}
//
(flake-utils.lib.eachSystem
[
flake-utils.lib.system.x86_64-linux
flake-utils.lib.system.aarch64-linux
]
(flake-utils.lib.eachDefaultSystem
(system:
let
pkgs = import nixpkgs {

4
systems.nix Normal file
View file

@ -0,0 +1,4 @@
[
"x86_64-linux"
"aarch64-linux"
]