diff --git a/modules/common/default.nix b/modules/common/default.nix index d0c90de..cb06c9e 100644 --- a/modules/common/default.nix +++ b/modules/common/default.nix @@ -3,9 +3,9 @@ { lib, type ? null, ... }: let allowedTypes = [ - "nixos" - "home" "darwin" + "home" + "nixos" ]; allowedTypesString = lib.concatStringSep ", " (builtins.map lib.escapeNixString allowedTypes); diff --git a/modules/nixos/home/default.nix b/modules/nixos/home/default.nix index fe00704..071509b 100644 --- a/modules/nixos/home/default.nix +++ b/modules/nixos/home/default.nix @@ -13,16 +13,23 @@ in config = lib.mkIf cfg.enable { home-manager = { - # Not a fan of out-of-directory imports, but this is a good exception - users.${config.my.user.name} = import "${inputs.self}/modules/home"; + users.${config.my.user.name} = { + # Not a fan of out-of-directory imports, but this is a good exception + imports = [ + "${inputs.self}/modules/common" + "${inputs.self}/modules/home" + ]; + }; # Nix Flakes compatibility useGlobalPkgs = true; useUserPackages = true; - # Forward inputs to home-manager configuration extraSpecialArgs = { + # Forward inputs to home-manager configuration inherit inputs; + # For consumption by common modules + type = "home"; }; }; };