mirror of
https://github.com/lightly-toasted/nix-config.git
synced 2025-12-10 03:49:44 +00:00
feat: add aarch64 support
This commit is contained in:
parent
eaa6a4fdec
commit
08f4e5aa90
1 changed files with 23 additions and 16 deletions
39
flake.nix
39
flake.nix
|
|
@ -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,25 +64,32 @@
|
||||||
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:
|
||||||
buildInputs = [
|
let
|
||||||
pkgs.nix
|
pkgs = import nixpkgs { inherit system; };
|
||||||
pkgs.home-manager
|
in
|
||||||
pkgs.sops
|
{
|
||||||
];
|
default = pkgs.mkShell {
|
||||||
|
buildInputs = [
|
||||||
|
pkgs.nix
|
||||||
|
pkgs.home-manager
|
||||||
|
pkgs.sops
|
||||||
|
];
|
||||||
|
|
||||||
shellHook = ''
|
shellHook = ''
|
||||||
HOST=$(hostname)
|
HOST=$(hostname)
|
||||||
alias deploy-nixos="sudo nixos-rebuild switch --flake .#$HOST"
|
alias deploy-nixos="sudo nixos-rebuild switch --flake .#$HOST"
|
||||||
alias deploy-vps="nixos-rebuild switch --flake .#vps --target-host root@vps"
|
alias deploy-vps="nixos-rebuild switch --flake .#vps --target-host root@vps"
|
||||||
alias deploy-home="home-manager switch --flake .#$USER@$HOST"
|
alias deploy-home="home-manager switch --flake .#$USER@$HOST"
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
}
|
||||||
|
);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue