# flake.nix { description = "My Home Manager flake"; inputs = { nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable"; home-manager.url = "github:nix-community/home-manager"; home-manager.inputs.nixpkgs.follows = "nixpkgs"; nix-colors.url = "github:misterio77/nix-colors"; }; outputs = { home-manager, nix-colors, ... }: let username = "myusername"; config = { configuration = import ./home.nix; inherit username; homeDirectory = "/Users/${username}"; # Update the state version as needed. # See the changelog here: # https://nix-community.github.io/home-manager/release-notes.html#sec-release-21.05 stateVersion = "22.05"; # Optionally use extraSpecialArgs # to pass through arguments to home.nix extraSpecialArgs = { inherit nix-colors; }; }; in { homeConfigurations."${username}@host1" = home-manager.lib.homeManagerConfiguration (config // {system = "x86_64-darwin";}); homeConfigurations."${username}@host2" = home-manager.lib.homeManagerConfiguration (config // {system = "aarch64-darwin";}); }; }