From 09f41eaf88d1a44a60c9cda44ed6b84708a7149b Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Thu, 7 Dec 2023 21:44:01 +0000 Subject: [PATCH] flake: home-manager: refactor 'mkHome' This will allow making a similar function for NixOS homes. --- flake/home-manager.nix | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/flake/home-manager.nix b/flake/home-manager.nix index d26d70c..5a1fa87 100644 --- a/flake/home-manager.nix +++ b/flake/home-manager.nix @@ -18,7 +18,7 @@ let } ]; - mkHome = name: system: inputs.home-manager.lib.homeManagerConfiguration { + mkHomeCommon = mainModule: system: inputs.home-manager.lib.homeManagerConfiguration { # Work-around for home-manager # * not letting me set `lib` as an extraSpecialArgs # * not respecting `nixpkgs.overlays` [1] @@ -31,9 +31,7 @@ let ]; }; - modules = defaultModules ++ [ - "${self}/hosts/homes/${name}" - ]; + modules = defaultModules ++ [ mainModule ]; extraSpecialArgs = { # Inject inputs to use them in global registry @@ -41,6 +39,7 @@ let }; }; + mkHome = name: mkHomeCommon "${self}/hosts/homes/${name}"; in { hosts.homes = {