Skip to content

Commit c1fce6f

Browse files
committed
feat: use nix-systems for supported architectures
1 parent 79de42d commit c1fce6f

File tree

3 files changed

+21
-9
lines changed

3 files changed

+21
-9
lines changed

README.md

+2
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ $ nix flake check
3737

3838
Secrets: [sops-nix](https://github.com/Mic92/sops-nix)
3939

40+
System Support: [nix-systems](https://github.com/nix-systems/nix-systems)
41+
4042
Packaging and dependency management: [nix-flakes](https://nixos.org/manual/nix/unstable/command-ref/new-cli/nix3-flake.html)
4143

4244
## Hosts

flake.lock

+16
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

flake.nix

+3-9
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
inputs = {
99
nixpkgs.url = "nixpkgs/bc571a7386d20d50f6a6a71c66598695237afacb";
1010
nixpkgs-unstable.url = "nixpkgs/nixos-unstable";
11+
systems.url = "github:nix-systems/default-linux";
1112

1213
# Extra packages
1314
nix-minecraft.url = "github:Infinidoge/nix-minecraft";
@@ -42,26 +43,19 @@
4243
self,
4344
nixpkgs,
4445
nixpkgs-unstable,
46+
systems,
4547
nix-minecraft,
4648
sops-nix,
4749
pre-commit-hooks,
4850
treefmt-nix,
4951
devshell,
5052
...
5153
}: let
52-
# List of system architectures that we want our flake binary outputs to support,
53-
# for example `outputs.packages` and `outputs.devshells`.
54-
# Note, this does not define architectures for the `nixosConfigurations`.
55-
supportedSystems = [
56-
"aarch64-linux"
57-
"x86_64-linux"
58-
];
59-
6054
# Outputs a set of attrsets with each supported system architecture as keys.
6155
# Inputs common `pkgs` and `system` attributes for use by the caller.
6256
# This makes supporting multiple system-architectures easy.
6357
eachSystem = f:
64-
nixpkgs.lib.genAttrs supportedSystems (system:
58+
nixpkgs.lib.genAttrs (import systems) (system:
6559
f {
6660
inherit system;
6761
pkgs = nixpkgs.legacyPackages.${system};

0 commit comments

Comments
 (0)