diff --git a/flake.nix b/flake.nix index 2de7caed..44e42612 100644 --- a/flake.nix +++ b/flake.nix @@ -326,8 +326,8 @@ nixpkgs.config.allowUnfree = true; # Setting the homely options. - home.username = builtins.baseNameOf path; - home.homeDirectory = "/home/${config.home.username}"; + home.username = metadata.username or name; + home.homeDirectory = metadata.home-directory or "/home/${config.home.username}"; }) userSharedConfig path @@ -336,6 +336,7 @@ mkUser { inherit extraModules extraArgs; system = metadata.system or defaultSystem; + home-manager-channel = metadata.home-manager-channel or "home-manager"; }) users; diff --git a/lib/images.nix b/lib/images.nix index 672b33da..6bc5f494 100644 --- a/lib/images.nix +++ b/lib/images.nix @@ -21,8 +21,8 @@ in }; # A wrapper around the home-manager configuration function. - mkUser = { system, extraModules ? [ ], extraArgs ? { } }: - inputs.home-manager.lib.homeManagerConfiguration { + mkUser = { system, extraModules ? [ ], extraArgs ? { }, home-manager-channel ? "home-manager" }: + inputs."${home-manager-channel}".lib.homeManagerConfiguration { inherit lib; extraSpecialArgs = extraArgs; pkgs = import nixpkgs { inherit system; };