{ description = "nate's dotfiles — zsh, nvim, tmux, wezterm, oh-my-posh"; inputs = { nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; home-manager = { url = "github:nix-community/home-manager"; inputs.nixpkgs.follows = "nixpkgs"; }; }; outputs = { nixpkgs, home-manager, ... }: let supportedSystems = [ "aarch64-darwin" "x86_64-linux" "aarch64-linux" ]; mkHome = system: let pkgs = nixpkgs.legacyPackages.${system}; isDarwin = builtins.match ".*-darwin" system != null; in home-manager.lib.homeManagerConfiguration { inherit pkgs; modules = [ ./home.nix ]; extraSpecialArgs = { inherit isDarwin; }; }; in { homeConfigurations = builtins.listToAttrs (map (system: { name = "nate@${system}"; value = mkHome system; }) supportedSystems); # convenience: `nix run .` applies config for current system # usage: nix run home-manager -- switch --flake .#nate@$(nix eval --raw nixpkgs#system) }; }