diff --git a/nix/home-manager/flake.nix b/nix/home-manager/flake.nix index 362b051..c7b13b9 100644 --- a/nix/home-manager/flake.nix +++ b/nix/home-manager/flake.nix @@ -18,29 +18,42 @@ }; outputs = { + self, nixpkgs, home-manager, devenv, nix-index-database, ... }: let - system = "x86_64-linux"; - pkgs = nixpkgs.legacyPackages.${system}; + inherit (nixpkgs.lib) optionalAttrs singleton optionals; + supportedSystems = ["aarch64-darwin" "x86_64-linux"]; + forAllSystems = nixpkgs.lib.genAttrs supportedSystems; + + pkgs = forAllSystems ( + system: + import nixpkgs { + inherit system; + # overlays = overlays; + config = {allowUnfree = true;}; + } + ); + + homeManagerConfigs = forAllSystems ( + system: { + pkgs = pkgs."${system}"; + modules = [ + {home.packages = [devenv.packages."${system}".devenv];} + nix-index-database.hmModules.nix-index + ./home.nix + ]; + } + ); in { - formatter."${system}" = nixpkgs.legacyPackages."${system}".alejandra; - homeConfigurations.acicchetti = home-manager.lib.homeManagerConfiguration { - inherit pkgs; + # formatter."${system}" = pkgs.alejandra; + homeConfigurations.aarch64-darwin-acicchetti = home-manager.lib.homeManagerConfiguration homeManagerConfigs."aarch64-darwin"; + homeConfigurations.x86_64-linux-acicchetti = home-manager.lib.homeManagerConfiguration homeManagerConfigs."x86_64-linux"; - # Specify your home configuration modules here, for example, - # the path to your home.nix. - modules = [ - {home.packages = [devenv.packages."${system}".devenv];} - nix-index-database.hmModules.nix-index - ./home.nix - ]; - - # Optionally use extraSpecialArgs - # to pass through arguments to home.nix - }; + defaultPackage.aarch64-darwin = self.homeConfigurations.aarch64-darwin-acicchetti.activationPackage; + defaultPackage.x86_64-linux = self.homeConfigurations.x86_64-linux-acicchetti.activationPackage; }; } diff --git a/nix/home-manager/home.nix b/nix/home-manager/home.nix index 2d7ebf9..c3d3c0b 100644 --- a/nix/home-manager/home.nix +++ b/nix/home-manager/home.nix @@ -65,7 +65,7 @@ # Let Home Manager install and manage itself. programs.home-manager.enable = true; - programs.zsh.enable = true; + # programs.zsh.enable = true; programs.nix-index.enable = true; imports = [