fix: thread selfPath through mkHome for m3taHome.paths.srcRoot

This commit is contained in:
2026-05-02 10:18:04 +02:00
parent 510665b359
commit 2cdd18a013
3 changed files with 9 additions and 4 deletions

View File

@@ -35,7 +35,7 @@
# Library functions — use in nixos-config via: # Library functions — use in nixos-config via:
# m3ta-lib = inputs.m3ta-home.lib; # m3ta-lib = inputs.m3ta-home.lib;
# imports = [ (m3ta-lib.mkHome { ... }) ]; # imports = [ (m3ta-lib.mkHome { ... }) ];
lib = import ./lib {inherit inputs;}; lib = import ./lib {inherit inputs; selfPath = self.outPath;};
# Overlays (re-exports from m3ta-nixpkgs) # Overlays (re-exports from m3ta-nixpkgs)
overlays = inputs.m3ta-nixpkgs.overlays; overlays = inputs.m3ta-nixpkgs.overlays;

View File

@@ -1,5 +1,5 @@
# lib/default.nix — Entry point for m3ta-home library functions. # lib/default.nix — Entry point for m3ta-home library functions.
# #
# Called by flake.nix: import ./lib { inherit inputs; } # Called by flake.nix: import ./lib { inherit inputs; selfPath = self.outPath; }
# Re-exports mkHome and future library functions. # Re-exports mkHome and future library functions.
{inputs}: import ./mkHome.nix {inherit inputs;} {inputs, selfPath}: import ./mkHome.nix {inherit inputs selfPath;}

View File

@@ -19,7 +19,7 @@
# m3ta.home.sets.coding.languages.python.extra = true; # m3ta.home.sets.coding.languages.python.extra = true;
# wayland.windowManager.hyprland.settings.monitor = [ ... ]; # wayland.windowManager.hyprland.settings.monitor = [ ... ];
# #
{inputs}: let {inputs, selfPath}: let
lib = inputs.nixpkgs.lib; lib = inputs.nixpkgs.lib;
in { in {
mkHome = { mkHome = {
@@ -80,6 +80,8 @@ in {
in { in {
imports = imports =
[ [
# Paths module — must be first, provides m3taHome.paths.srcRoot
../modules/paths.nix
baseModule baseModule
preferencesPath preferencesPath
identityPath identityPath
@@ -87,6 +89,9 @@ in {
++ contextImport ++ contextImport
++ setImports; ++ setImports;
# Set the flake source root for asset path resolution
m3taHome.paths.srcRoot = selfPath;
assertions = assertions =
[ [
{ {