From dbef6a02cbc85e1553f531069ff62788cf3be5a2 Mon Sep 17 00:00:00 2001 From: Victor Borja Date: Sun, 8 Feb 2026 09:47:04 -0600 Subject: [PATCH] fix(hm): parametric aspects at user.includes are accounted now --- .../provides/home-manager/hm-dependencies.nix | 3 +-- .../ci/modules/host-user-conditional-hm.nix | 18 ++++++++++++------ 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/modules/aspects/provides/home-manager/hm-dependencies.nix b/modules/aspects/provides/home-manager/hm-dependencies.nix index 253c9dd..50c56b9 100644 --- a/modules/aspects/provides/home-manager/hm-dependencies.nix +++ b/modules/aspects/provides/home-manager/hm-dependencies.nix @@ -22,9 +22,8 @@ let includes = [ (owned den.default) (statics den.default) - (owned HM-OS-USER.HM) - (statics HM-OS-USER.HM) (parametric.fixedTo HM-OS-USER HM-OS-USER.OS) + (parametric.fixedTo HM-OS-USER HM-OS-USER.HM) ]; }; diff --git a/templates/ci/modules/host-user-conditional-hm.nix b/templates/ci/modules/host-user-conditional-hm.nix index d2ff848..597e46f 100644 --- a/templates/ci/modules/host-user-conditional-hm.nix +++ b/templates/ci/modules/host-user-conditional-hm.nix @@ -1,7 +1,8 @@ { lib, ... }: let # Example: configuration that depends on both host and user. provides only to HM. - host-to-user-conditional = + program-conditional = + program: { user, host, @@ -9,17 +10,18 @@ let }: if user.userName == "alice" && !lib.hasSuffix "darwin" host.system then { - homeManager.programs.git.enable = true; + homeManager.programs.${program}.enable = true; } else { }; in { - den.aspects.rockhopper.includes = [ - # Example: host provides parametric user configuration. - host-to-user-conditional - ]; + # Example: host parametric includes. conditional user configuration. + den.aspects.rockhopper.includes = [ (program-conditional "git") ]; + + # Example: user parametric includes + den.aspects.alice.includes = [ (program-conditional "mpv") ]; perSystem = { @@ -37,6 +39,10 @@ in !alice-at-honeycrisp.programs.git.enable ); + checks.alice-hm-mpv-enabled-rockhopper = checkCond "home-managed mpv for alice at rockhopper" ( + alice-at-rockhopper.programs.mpv.enable + ); + }; }