feat: add aarch64 support

This commit is contained in:
toast 2025-10-09 20:18:52 +09:00
parent eaa6a4fdec
commit 08f4e5aa90

View file

@ -31,8 +31,8 @@
outputs = { self, nixpkgs, home-manager, ... } @ inputs: outputs = { self, nixpkgs, home-manager, ... } @ inputs:
let let
rootPath = ./.; rootPath = ./.;
system = "x86_64-linux"; systems = [ "x86_64-linux" "aarch64-linux" ];
pkgs = import nixpkgs { inherit system; }; forAllSystems = f: nixpkgs.lib.genAttrs systems (system: f system);
in in
{ {
nixosConfigurations = { nixosConfigurations = {
@ -64,13 +64,18 @@
modules = [ ./home/hosts/wsl.nix ]; modules = [ ./home/hosts/wsl.nix ];
}; };
"android@y2q" = home-manager.lib.homeManagerConfiguration { "android@y2q" = home-manager.lib.homeManagerConfiguration {
pkgs = nixpkgs.legacyPackages.x86_64-linux; pkgs = nixpkgs.legacyPackages.aarch64-linux;
extraSpecialArgs = { inherit inputs rootPath; }; extraSpecialArgs = { inherit inputs rootPath; };
modules = [ ./home/hosts/y2q.nix ]; modules = [ ./home/hosts/y2q.nix ];
}; };
}; };
devShells.${system}.default = pkgs.mkShell { devShells = forAllSystems (system:
let
pkgs = import nixpkgs { inherit system; };
in
{
default = pkgs.mkShell {
buildInputs = [ buildInputs = [
pkgs.nix pkgs.nix
pkgs.home-manager pkgs.home-manager
@ -84,5 +89,7 @@
alias deploy-home="home-manager switch --flake .#$USER@$HOST" alias deploy-home="home-manager switch --flake .#$USER@$HOST"
''; '';
}; };
}
);
}; };
} }