devbox: select Home Manager target by architecture #2

Merged
jmug merged 2 commits from codex/architecture-aware-homesw into main 2026-09-25 20:42:21 +00:00
2 changed files with 5 additions and 7 deletions
Showing only changes of commit 30d2f29e7b - Show all commits
+2
View File
@@ -228,6 +228,7 @@
devbox = home-manager.lib.homeManagerConfiguration { devbox = home-manager.lib.homeManagerConfiguration {
pkgs = nixpkgs.legacyPackages."x86_64-linux"; pkgs = nixpkgs.legacyPackages."x86_64-linux";
extraSpecialArgs = { extraSpecialArgs = {
homeConfigurationName = "devbox";
pkgs-unstable = pkgs-unstable_x86_64-linux; pkgs-unstable = pkgs-unstable_x86_64-linux;
}; };
modules = [ modules = [
@@ -237,6 +238,7 @@
armdevbox = home-manager.lib.homeManagerConfiguration { armdevbox = home-manager.lib.homeManagerConfiguration {
pkgs = nixpkgs.legacyPackages."aarch64-linux"; pkgs = nixpkgs.legacyPackages."aarch64-linux";
extraSpecialArgs = { extraSpecialArgs = {
homeConfigurationName = "armdevbox";
pkgs-unstable = pkgs-unstable_aarch64-linux; pkgs-unstable = pkgs-unstable_aarch64-linux;
}; };
modules = [ modules = [
+3 -7
View File
@@ -1,13 +1,9 @@
{ {
homeConfigurationName,
pkgs, pkgs,
pkgs-unstable, pkgs-unstable,
... ...
} : } : {
let
homeConfiguration =
if pkgs.stdenv.hostPlatform.system == "aarch64-linux" then "armdevbox" else "devbox";
in
{
imports = [ imports = [
../../home-modules/default.nix ../../home-modules/default.nix
../../home-modules/nvim.nix ../../home-modules/nvim.nix
@@ -33,7 +29,7 @@ in
programs.zsh = { programs.zsh = {
shellAliases = { shellAliases = {
homesw = "home-manager --flake /home/jmug/nixos#${homeConfiguration} --extra-experimental-features nix-command --extra-experimental-features flakes switch"; homesw = "home-manager --flake /home/jmug/nixos#${homeConfigurationName} --extra-experimental-features nix-command --extra-experimental-features flakes switch";
}; };
}; };