diff --git a/flake.nix b/flake.nix index b11dd26..8f88899 100644 --- a/flake.nix +++ b/flake.nix @@ -21,6 +21,14 @@ nur, ... }: + let + supportedSystems = [ + "x86_64-linux" + "aarch64-darwin" + "aarch64-linux" + ]; + forAllSystems = nixpkgs.lib.genAttrs supportedSystems; + in { nixosConfigurations = { laptop = nixpkgs.lib.nixosSystem { @@ -32,33 +40,33 @@ ]; }; }; + homeConfigurations = nixpkgs.lib.foldl' ( + acc: system: + acc + // { + "irl-${system}" = home-manager.lib.homeManagerConfiguration { + pkgs = import nixpkgs { + inherit system; + overlays = [ nur.overlay ]; + }; + modules = [ ./home/irl.nix ]; + }; + "irl-gui-${system}" = home-manager.lib.homeManagerConfiguration { + pkgs = import nixpkgs { + inherit system; + overlays = [ nur.overlay ]; + }; + modules = [ + ./home/irl.nix + { + irl.gui-packages = true; + } + ]; + }; + } + ) { } supportedSystems; } - // flake-utils.lib.eachSystem flake-utils.lib.allSystems (system: { + // flake-utils.lib.eachSystem supportedSystems (system: { formatter = nixpkgs.legacyPackages.${system}.nixfmt-rfc-style; - packages.homeConfigurations = { - irl = home-manager.lib.homeManagerConfiguration { - pkgs = import nixpkgs { - inherit system; - overlays = [ - nur.overlay - ]; - }; - modules = [ ./home/irl.nix ]; - }; - irl-gui = home-manager.lib.homeManagerConfiguration { - pkgs = import nixpkgs { - inherit system; - overlays = [ - nur.overlay - ]; - }; - modules = [ - ./home/irl.nix - { - irl.gui-packages = true; - } - ]; - }; - }; }); }