From 17b7485e3a15b84664fea0fc398bf5bf76f6d970 Mon Sep 17 00:00:00 2001 From: m3ta-chiron Date: Sat, 2 May 2026 09:56:45 +0200 Subject: [PATCH] fix: remove double-lambda in mkHome (was rejecting 'sets' argument) --- lib/default.nix | 12 +++--------- lib/mkHome.nix | 50 ++++++++++++++++++++++++------------------------- 2 files changed, 28 insertions(+), 34 deletions(-) diff --git a/lib/default.nix b/lib/default.nix index e7c0173..fd042bc 100644 --- a/lib/default.nix +++ b/lib/default.nix @@ -1,11 +1,5 @@ # lib/default.nix — Entry point for m3ta-home library functions. # -# Provides: -# mkHome — compose a complete HM config from user + identity + context + sets -# mkDevShell — create project-level dev shells from language sets -{inputs}: { - mkHome = import ./mkHome.nix {inherit inputs;}; - - # TODO: mkDevShell for project-level flake devShells - # mkDevShell = import ./mkDevShell.nix { inherit inputs; }; -} +# Called by flake.nix: import ./lib { inherit inputs; } +# Re-exports mkHome and future library functions. +{inputs}: import ./mkHome.nix {inherit inputs;} diff --git a/lib/mkHome.nix b/lib/mkHome.nix index 5776d79..b1e3cab 100644 --- a/lib/mkHome.nix +++ b/lib/mkHome.nix @@ -19,31 +19,8 @@ # m3ta.home.sets.coding.languages.python.extra = true; # wayland.windowManager.hyprland.settings.monitor = [ ... ]; # -{inputs}: -{lib ? inputs.nixpkgs.lib}: -let - # --- Module path helpers --- - profilePath = ../profiles; - userPath = ../users; - - # Always loaded — CLI tools, shell, secrets, overlays - baseModule = "${profilePath}/base"; - - # Context modules — mutually exclusive (desktop or server) - contextModuleMap = { - desktop = "${profilePath}/contexts/desktop"; - server = "${profilePath}/contexts/server"; - }; - - # Feature sets — freely combinable, some have context guards - setModuleMap = { - coding = "${profilePath}/sets/coding"; - gaming = "${profilePath}/sets/gaming"; - media = "${profilePath}/sets/media"; - }; - - # Sets that require desktop context - desktopOnlySets = ["gaming" "media"]; +{inputs}: let + lib = inputs.nixpkgs.lib; in { mkHome = { user ? "m3tam3re", @@ -51,6 +28,29 @@ in { context ? null, sets ? [], }: let + # --- Module path helpers --- + profilePath = ../profiles; + userPath = ../users; + + # Always loaded — CLI tools, shell, secrets, overlays + baseModule = "${profilePath}/base"; + + # Context modules — mutually exclusive (desktop or server) + contextModuleMap = { + desktop = "${profilePath}/contexts/desktop"; + server = "${profilePath}/contexts/server"; + }; + + # Feature sets — freely combinable, some have context guards + setModuleMap = { + coding = "${profilePath}/sets/coding"; + gaming = "${profilePath}/sets/gaming"; + media = "${profilePath}/sets/media"; + }; + + # Sets that require desktop context + desktopOnlySets = ["gaming" "media"]; + # User preferences — always loaded (shell style, editor config, etc.) preferencesPath = "${userPath}/${user}/preferences";