maybe multi-variant support
This commit is contained in:
parent
493fc8d1ff
commit
3eb8e1988f
2 changed files with 30 additions and 17 deletions
|
@ -18,29 +18,42 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = {
|
outputs = {
|
||||||
|
self,
|
||||||
nixpkgs,
|
nixpkgs,
|
||||||
home-manager,
|
home-manager,
|
||||||
devenv,
|
devenv,
|
||||||
nix-index-database,
|
nix-index-database,
|
||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
system = "x86_64-linux";
|
inherit (nixpkgs.lib) optionalAttrs singleton optionals;
|
||||||
pkgs = nixpkgs.legacyPackages.${system};
|
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 {
|
in {
|
||||||
formatter."${system}" = nixpkgs.legacyPackages."${system}".alejandra;
|
# formatter."${system}" = pkgs.alejandra;
|
||||||
homeConfigurations.acicchetti = home-manager.lib.homeManagerConfiguration {
|
homeConfigurations.aarch64-darwin-acicchetti = home-manager.lib.homeManagerConfiguration homeManagerConfigs."aarch64-darwin";
|
||||||
inherit pkgs;
|
homeConfigurations.x86_64-linux-acicchetti = home-manager.lib.homeManagerConfiguration homeManagerConfigs."x86_64-linux";
|
||||||
|
|
||||||
# Specify your home configuration modules here, for example,
|
defaultPackage.aarch64-darwin = self.homeConfigurations.aarch64-darwin-acicchetti.activationPackage;
|
||||||
# the path to your home.nix.
|
defaultPackage.x86_64-linux = self.homeConfigurations.x86_64-linux-acicchetti.activationPackage;
|
||||||
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
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -65,7 +65,7 @@
|
||||||
|
|
||||||
# Let Home Manager install and manage itself.
|
# Let Home Manager install and manage itself.
|
||||||
programs.home-manager.enable = true;
|
programs.home-manager.enable = true;
|
||||||
programs.zsh.enable = true;
|
# programs.zsh.enable = true;
|
||||||
programs.nix-index.enable = true;
|
programs.nix-index.enable = true;
|
||||||
|
|
||||||
imports = [
|
imports = [
|
||||||
|
|
Loading…
Add table
Reference in a new issue