From c593180cf2c3bacf59650c3ce54218214de94283 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 7d87a61..9536c46 100644 --- a/flake/home-manager.nix +++ b/flake/home-manager.nix @@ -20,7 +20,7 @@ let "${self}/modules/common" ]; - mkHome = name: system: inputs.home-manager.lib.homeManagerConfiguration { + mkHomeCommon = mainModules: system: inputs.home-manager.lib.homeManagerConfiguration { # Work-around for home-manager # * not letting me set `lib` as an extraSpecialArgs # * not respecting `nixpkgs.overlays` [1] @@ -33,9 +33,7 @@ let ]; }; - modules = defaultModules ++ [ - "${self}/hosts/homes/${name}" - ]; + modules = defaultModules ++ mainModules; extraSpecialArgs = { # Inject inputs to use them in global registry @@ -45,6 +43,7 @@ let }; }; + mkHome = name: mkHomeCommon [ "${self}/hosts/homes/${name}" ]; in { hosts.homes = {