{ inputs = { nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable"; utils.url = "github:numtide/flake-utils"; home-manager.url = "github:nix-community/home-manager"; home-manager.inputs.nixpkgs.follows = "nixpkgs"; mach-nix.url = "mach-nix/3.5.0"; mach-nix.inputs.nixpkgs.follows = "nixpkgs"; }; outputs = {self, nixpkgs, flake-utils, home-manager, mach-nix, ...}: let pkgsForSystem = (system: import nixpkgs { inherit system; overlays = [ self.overlays."${system}".xonsh_with_plugins ]; config.allowUnfree = true; }); mkHomeConfig = ({system, username ? "ttm" }: home-manager.lib.homeManagerConfiguration { pkgs = pkgsForSystem system; modules = [ ./home.nix { home = { inherit username; }; } ]; }); in flake-utils.lib.eachDefaultSystem (system: { overlays.xonsh_with_plugins = import ./overlays/xonsh.nix { mach-nix = mach-nix.lib."${system}"; }; legacyPackages.homeConfigurations.std = mkHomeConfig { inherit system; }; }); }