{ lib, options, namespace, inputs, ... }: { options.${namespace}.home = with lib.types; { configFile = lib.mkOption { type = attrs; default = { }; description = "A set of files to be managed by home-manager's ."; }; extraOptions = lib.mkOption { type = attrs; default = { }; description = "Options to pass directly to home-manager."; }; file = lib.mkOption { type = attrs; default = { }; description = "A set of files to be managed by home-manager's ."; }; }; config = { home-manager = { # enables backing up existing files instead of erroring if conflicts exist backupFileExtension = "backup"; useGlobalPkgs = true; useUserPackages = true; # Pass inputs so external modules can access them extraSpecialArgs = { inherit inputs namespace; }; # Make ALL external HM modules available globally # Note: sops-nix, nix-index-database, and stylix are already injected # globally via systems.modules.home in flake.nix; only darwin-specific # modules that aren't in the global list should go here. sharedModules = with inputs; [ nix-plist-manager.homeManagerModules.default # Add any other darwin-specific external HM modules here ]; users."mattjallen" = lib.mkAliasDefinitions options.${namespace}.home.extraOptions; verbose = true; }; }; }