From 2ee9461c9e824803bfce02c9b795189642c7508c Mon Sep 17 00:00:00 2001 From: Romain Paquet Date: Sat, 24 May 2025 18:35:16 +0200 Subject: [PATCH] make devshell work on aarch64-linux --- flake.nix | 51 ++++++++++++++++++++++++++++----------------------- 1 file changed, 28 insertions(+), 23 deletions(-) diff --git a/flake.nix b/flake.nix index 5103abf..d1af54a 100644 --- a/flake.nix +++ b/flake.nix @@ -64,29 +64,34 @@ inherit (clan) clanInternals nixosConfigurations; devShells = - let - system = "x86_64-linux"; - pkgs = import nixpkgs { - inherit system; - }; - in - { - "${system}".default = pkgs.mkShell { - packages = [ - inputs.agenix.packages.${system}.default - clan-core.packages.${system}.clan-cli - pkgs.nil # Nix language server - pkgs.nixfmt-rfc-style - pkgs.opentofu - pkgs.terraform-ls - pkgs.deploy-rs - pkgs.zsh - ]; - shellhook = '' - exec zsh - ''; - }; - }; + nixpkgs.lib.genAttrs + [ + "x86_64-linux" + "aarch64-linux" + ] + ( + system: + let + pkgs = nixpkgs.legacyPackages.${system}; + in + { + default = pkgs.mkShell { + packages = [ + inputs.agenix.packages.${system}.default + clan-core.packages.${system}.clan-cli + pkgs.nil # Nix language server + pkgs.nixfmt-rfc-style + pkgs.opentofu + pkgs.terraform-ls + pkgs.deploy-rs + pkgs.zsh + ]; + shellhook = '' + exec zsh + ''; + }; + } + ); }; inputs = {