den icon indicating copy to clipboard operation
den copied to clipboard

BUG: attribute 'host' missing when a sub-aspect is defined across multiple modules that MIX bare parametric functions with plain attrsets

Open kalyanoliveira opened this issue 7 months ago • 13 comments

Defined at https://github.com/kalyanoliveira/den/tree/push-asdfahuog

or simply copy the following into your bug.nix

{ denTest, ... }:
{
  flake.tests.bogus = {

    test-minimal-mixed-merge = denTest (
      {
        den,
        lib,
        igloo,
        ...
      }:
      {
        den.hosts.x86_64-linux.igloo.users.tux = { };

        imports =
          let
            # Bare function at _.sub
            fn-def = {
              den.aspects.bar._.sub = { host, ... }: {
                nixos.networking.hostName = host.hostName;
              };
            };

            # Plain attrset at the SAME _.sub
            attrset-def = {
              den.aspects.bar._.sub.nixos.programs.vim.enable = true;
            };
          in
          [ fn-def attrset-def ];

        den.aspects.igloo.includes = [ den.aspects.bar._.sub ];

        expr = {
          hostname = igloo.networking.hostName;
          vim = igloo.programs.vim.enable;
        };
        expected = {
          hostname = "igloo";
          vim = true;
        };
      }
    );

  };
}

Unless I have not properly updated my flake inputs for the bogus test, the above I believe is a pretty simple representation of a bug that one easily finds when creating atomic configs. AND IT ONLY HAPPENS FOR SUB ASPECTS.

It would be interesting to see current den ci test coverage, and how its tests take into account the full modularization that is possible with the import tree battery (or the import-tree repo itself).

kalyanoliveira avatar Apr 13 '26 05:04 kalyanoliveira

note that this doesn't fix it

den on  push-asdfahuog [!] via ❄️  impure (devenv-shell-env)
❯ git diff
diff --git a/nix/lib/aspects/types.nix b/nix/lib/aspects/types.nix
index e96b75c..422e433 100644
--- a/nix/lib/aspects/types.nix
+++ b/nix/lib/aspects/types.nix
@@ -132,7 +132,7 @@ let
             default = { };
             type = lib.types.submodule {
               freeformType = lib.types.lazyAttrsOf (
-                providerType (
+                coercedProviderType (
                   cnf
                   // {
                     providerPrefix = (cnf.providerPrefix or [ ]) ++ [ config.name ];

I mean, the bug.nix test case passes when I do this

but other things break in the ci testing pipeline. deadbug 352 specifically, and also den-as-lib.test-module-can-resolve-custom-domain

which means that deadbug 352 relied on provides not coercing?

kalyanoliveira avatar Apr 13 '26 05:04 kalyanoliveira

Is this still going to be relevant after https://github.com/sini/den/pull/2 ?

kalyanoliveira avatar Apr 14 '26 17:04 kalyanoliveira

Are you able to confirm if this bug is a regression against current main and if it passes against the 0.15.0 tag or not?

sini avatar Apr 14 '26 23:04 sini

on it

kalyanoliveira avatar Apr 14 '26 23:04 kalyanoliveira

here is testing on v0.15.0: does not pass:


den on  HEAD (8101ec8) [!] via ❄️  impure (devenv-shell-env)
❯ git log -1
commit 8101ec865c0bf4027d40b9fd8951e3e435a86d64 (HEAD, tag: v0.15.0, tag: latest)
Author: Victor Borja <[email protected]>
Date:   Tue Apr 7 02:43:24 2026 -0600

    update locks

den on  HEAD (8101ec8) [!] via ❄️  impure (devenv-shell-env)
❯ git diff
diff --git a/templates/bogus/modules/bug.nix b/templates/bogus/modules/bug.nix
index e9782ec..9df4ea4 100644
--- a/templates/bogus/modules/bug.nix
+++ b/templates/bogus/modules/bug.nix
@@ -2,23 +2,42 @@
 {
   flake.tests.bogus = {

-    test-something = denTest (
+    test-minimal-mixed-merge = denTest (
       {
         den,
         lib,
-        igloo, # igloo = nixosConfigurations.igloo.config
-        tuxHm, # tuxHm = igloo.home-manager.users.tux
+        igloo,
         ...
       }:
       {
-        # replace <system> if you are reporting a bug in MacOS
         den.hosts.x86_64-linux.igloo.users.tux = { };

-        # do something for testing
-        den.aspects.tux.user.description = "The Penguin";
+        imports =
+          let
+            # Bare function at _.sub
+            fn-def = {
+              den.aspects.bar._.sub = { host, ... }: {
+                nixos.networking.hostName = host.hostName;
+              };
+            };

-        expr = igloo.users.users.tux.description;
-        expected = "The Penguin";
+            # Plain attrset at the SAME _.sub
+            attrset-def = {
+              den.aspects.bar._.sub.nixos.programs.vim.enable = true;
+            };
+          in
+          [ fn-def attrset-def ];
+
+        den.aspects.igloo.includes = [ den.aspects.bar._.sub ];
+
+        expr = {
+          hostname = igloo.networking.hostName;
+          vim = igloo.programs.vim.enable;
+        };
+        expected = {
+          hostname = "igloo";
+          vim = true;
+        };
       }
     );


den on  HEAD (8101ec8) [!] via ❄️  impure (devenv-shell-env) took 2s
❯ , nix-unit --flake ./templates/bogus#tests --override-input den .
warning: unknown setting 'allowed-users'
warning: unknown setting 'trusted-users'
warning: `--gc-roots-dir' not specified
warning: Git tree '/home/horyzon/persist/monastery/needs-sorting/joining-den-content-20260406181223/20260413014345/den' is dirty
warning: not writing modified lock file of flake 'git+file:///home/horyzon/persist/monastery/needs-sorting/joining-den-content-20260406181223/20260413014345/den?dir=templates/bogus':
• Updated input 'den':
    'github:vic/den/53c30ea9acbd357077defec263066506771e9630?narHash=sha256-9GuRhcEA8YoYa1XYeJxBP0V5H%2BGn4pH41cgQHe3hL5M%3D' (2026-04-07)
  → 'git+file:///home/horyzon/persist/monastery/needs-sorting/joining-den-content-20260406181223/20260413014345/den' (2026-04-07)
☢️ bogus.test-minimal-mixed-merge
error:
       … while evaluating the attribute 'hostname'
         at /nix/store/8kz303qj6lzmqdfh59n6rjbz05nvm7xy-source/templates/bogus/modules/bug.nix:34:11:
           33|         expr = {
           34|           hostname = igloo.networking.hostName;
             |           ^
           35|           vim = igloo.programs.vim.enable;

       … while evaluating the attribute 'value'
         at /nix/store/mfgmf94yh6dxynx3bp7bdjnk8xrkz331-source/lib/modules.nix:1160:7:
         1159|     // {
         1160|       value = addErrorContext "while evaluating the option `${showOption loc}':" value;
             |       ^
         1161|       inherit (res.defsFinal') highestPrio;

       … while evaluating the option `networking.hostName':

       … while evaluating definitions from `<unknown-file>, via option den.aspects.bar.provides.sub.nixos':

       … while evaluating the module argument `host' in ":anon-5:anon-1":

       … noting that argument `host` is not externally provided, so querying `_module.args` instead, requiring `config`

       (stack trace truncated; use '--show-trace' to show the full, detailed trace)

       error: attribute 'host' missing
       at /nix/store/mfgmf94yh6dxynx3bp7bdjnk8xrkz331-source/lib/modules.nix:727:13:
          726|             "noting that argument `${name}` is not externally provided, so querying `_module.args` instead, requiring `config`"
          727|             config._module.args.${name}
             |             ^
          728|           )

☢️ systems.aarch64-darwin.system-agnostic.bogus.test-minimal-mixed-merge
error:
       … while evaluating the attribute 'hostname'
         at /nix/store/8kz303qj6lzmqdfh59n6rjbz05nvm7xy-source/templates/bogus/modules/bug.nix:34:11:
           33|         expr = {
           34|           hostname = igloo.networking.hostName;
             |           ^
           35|           vim = igloo.programs.vim.enable;

       … while evaluating the attribute 'value'
         at /nix/store/mfgmf94yh6dxynx3bp7bdjnk8xrkz331-source/lib/modules.nix:1160:7:
         1159|     // {
         1160|       value = addErrorContext "while evaluating the option `${showOption loc}':" value;
             |       ^
         1161|       inherit (res.defsFinal') highestPrio;

       … while evaluating the option `networking.hostName':

       … while evaluating definitions from `<unknown-file>, via option den.aspects.bar.provides.sub.nixos':

       … while evaluating the module argument `host' in ":anon-5:anon-1":

       … noting that argument `host` is not externally provided, so querying `_module.args` instead, requiring `config`

       (stack trace truncated; use '--show-trace' to show the full, detailed trace)

       error: attribute 'host' missing
       at /nix/store/mfgmf94yh6dxynx3bp7bdjnk8xrkz331-source/lib/modules.nix:727:13:
          726|             "noting that argument `${name}` is not externally provided, so querying `_module.args` instead, requiring `config`"
          727|             config._module.args.${name}
             |             ^
          728|           )

☢️ systems.aarch64-linux.system-agnostic.bogus.test-minimal-mixed-merge
error:
       … while evaluating the attribute 'hostname'
         at /nix/store/8kz303qj6lzmqdfh59n6rjbz05nvm7xy-source/templates/bogus/modules/bug.nix:34:11:
           33|         expr = {
           34|           hostname = igloo.networking.hostName;
             |           ^
           35|           vim = igloo.programs.vim.enable;

       … while evaluating the attribute 'value'
         at /nix/store/mfgmf94yh6dxynx3bp7bdjnk8xrkz331-source/lib/modules.nix:1160:7:
         1159|     // {
         1160|       value = addErrorContext "while evaluating the option `${showOption loc}':" value;
             |       ^
         1161|       inherit (res.defsFinal') highestPrio;

       … while evaluating the option `networking.hostName':

       … while evaluating definitions from `<unknown-file>, via option den.aspects.bar.provides.sub.nixos':

       … while evaluating the module argument `host' in ":anon-5:anon-1":

       … noting that argument `host` is not externally provided, so querying `_module.args` instead, requiring `config`

       (stack trace truncated; use '--show-trace' to show the full, detailed trace)

       error: attribute 'host' missing
       at /nix/store/mfgmf94yh6dxynx3bp7bdjnk8xrkz331-source/lib/modules.nix:727:13:
          726|             "noting that argument `${name}` is not externally provided, so querying `_module.args` instead, requiring `config`"
          727|             config._module.args.${name}
             |             ^
          728|           )

☢️ systems.armv6l-linux.system-agnostic.bogus.test-minimal-mixed-merge
error:
       … while evaluating the attribute 'hostname'
         at /nix/store/8kz303qj6lzmqdfh59n6rjbz05nvm7xy-source/templates/bogus/modules/bug.nix:34:11:
           33|         expr = {
           34|           hostname = igloo.networking.hostName;
             |           ^
           35|           vim = igloo.programs.vim.enable;

       … while evaluating the attribute 'value'
         at /nix/store/mfgmf94yh6dxynx3bp7bdjnk8xrkz331-source/lib/modules.nix:1160:7:
         1159|     // {
         1160|       value = addErrorContext "while evaluating the option `${showOption loc}':" value;
             |       ^
         1161|       inherit (res.defsFinal') highestPrio;

       … while evaluating the option `networking.hostName':

       … while evaluating definitions from `<unknown-file>, via option den.aspects.bar.provides.sub.nixos':

       … while evaluating the module argument `host' in ":anon-5:anon-1":

       … noting that argument `host` is not externally provided, so querying `_module.args` instead, requiring `config`

       (stack trace truncated; use '--show-trace' to show the full, detailed trace)

       error: attribute 'host' missing
       at /nix/store/mfgmf94yh6dxynx3bp7bdjnk8xrkz331-source/lib/modules.nix:727:13:
          726|             "noting that argument `${name}` is not externally provided, so querying `_module.args` instead, requiring `config`"
          727|             config._module.args.${name}
             |             ^
          728|           )

☢️ systems.armv7l-linux.system-agnostic.bogus.test-minimal-mixed-merge
error:
       … while evaluating the attribute 'hostname'
         at /nix/store/8kz303qj6lzmqdfh59n6rjbz05nvm7xy-source/templates/bogus/modules/bug.nix:34:11:
           33|         expr = {
           34|           hostname = igloo.networking.hostName;
             |           ^
           35|           vim = igloo.programs.vim.enable;

       … while evaluating the attribute 'value'
         at /nix/store/mfgmf94yh6dxynx3bp7bdjnk8xrkz331-source/lib/modules.nix:1160:7:
         1159|     // {
         1160|       value = addErrorContext "while evaluating the option `${showOption loc}':" value;
             |       ^
         1161|       inherit (res.defsFinal') highestPrio;

       … while evaluating the option `networking.hostName':

       … while evaluating definitions from `<unknown-file>, via option den.aspects.bar.provides.sub.nixos':

       … while evaluating the module argument `host' in ":anon-5:anon-1":

       … noting that argument `host` is not externally provided, so querying `_module.args` instead, requiring `config`

       (stack trace truncated; use '--show-trace' to show the full, detailed trace)

       error: attribute 'host' missing
       at /nix/store/mfgmf94yh6dxynx3bp7bdjnk8xrkz331-source/lib/modules.nix:727:13:
          726|             "noting that argument `${name}` is not externally provided, so querying `_module.args` instead, requiring `config`"
          727|             config._module.args.${name}
             |             ^
          728|           )

☢️ systems.i686-linux.system-agnostic.bogus.test-minimal-mixed-merge
error:
       … while evaluating the attribute 'hostname'
         at /nix/store/8kz303qj6lzmqdfh59n6rjbz05nvm7xy-source/templates/bogus/modules/bug.nix:34:11:
           33|         expr = {
           34|           hostname = igloo.networking.hostName;
             |           ^
           35|           vim = igloo.programs.vim.enable;

       … while evaluating the attribute 'value'
         at /nix/store/mfgmf94yh6dxynx3bp7bdjnk8xrkz331-source/lib/modules.nix:1160:7:
         1159|     // {
         1160|       value = addErrorContext "while evaluating the option `${showOption loc}':" value;
             |       ^
         1161|       inherit (res.defsFinal') highestPrio;

       … while evaluating the option `networking.hostName':

       … while evaluating definitions from `<unknown-file>, via option den.aspects.bar.provides.sub.nixos':

       … while evaluating the module argument `host' in ":anon-5:anon-1":

       … noting that argument `host` is not externally provided, so querying `_module.args` instead, requiring `config`

       (stack trace truncated; use '--show-trace' to show the full, detailed trace)

       error: attribute 'host' missing
       at /nix/store/mfgmf94yh6dxynx3bp7bdjnk8xrkz331-source/lib/modules.nix:727:13:
          726|             "noting that argument `${name}` is not externally provided, so querying `_module.args` instead, requiring `config`"
          727|             config._module.args.${name}
             |             ^
          728|           )

☢️ systems.powerpc64le-linux.system-agnostic.bogus.test-minimal-mixed-merge
error:
       … while evaluating the attribute 'hostname'
         at /nix/store/8kz303qj6lzmqdfh59n6rjbz05nvm7xy-source/templates/bogus/modules/bug.nix:34:11:
           33|         expr = {
           34|           hostname = igloo.networking.hostName;
             |           ^
           35|           vim = igloo.programs.vim.enable;

       … while evaluating the attribute 'value'
         at /nix/store/mfgmf94yh6dxynx3bp7bdjnk8xrkz331-source/lib/modules.nix:1160:7:
         1159|     // {
         1160|       value = addErrorContext "while evaluating the option `${showOption loc}':" value;
             |       ^
         1161|       inherit (res.defsFinal') highestPrio;

       … while evaluating the option `networking.hostName':

       … while evaluating definitions from `<unknown-file>, via option den.aspects.bar.provides.sub.nixos':

       … while evaluating the module argument `host' in ":anon-5:anon-1":

       … noting that argument `host` is not externally provided, so querying `_module.args` instead, requiring `config`

       (stack trace truncated; use '--show-trace' to show the full, detailed trace)

       error: attribute 'host' missing
       at /nix/store/mfgmf94yh6dxynx3bp7bdjnk8xrkz331-source/lib/modules.nix:727:13:
          726|             "noting that argument `${name}` is not externally provided, so querying `_module.args` instead, requiring `config`"
          727|             config._module.args.${name}
             |             ^
          728|           )

☢️ systems.riscv64-linux.system-agnostic.bogus.test-minimal-mixed-merge
error:
       … while evaluating the attribute 'hostname'
         at /nix/store/8kz303qj6lzmqdfh59n6rjbz05nvm7xy-source/templates/bogus/modules/bug.nix:34:11:
           33|         expr = {
           34|           hostname = igloo.networking.hostName;
             |           ^
           35|           vim = igloo.programs.vim.enable;

       … while evaluating the attribute 'value'
         at /nix/store/mfgmf94yh6dxynx3bp7bdjnk8xrkz331-source/lib/modules.nix:1160:7:
         1159|     // {
         1160|       value = addErrorContext "while evaluating the option `${showOption loc}':" value;
             |       ^
         1161|       inherit (res.defsFinal') highestPrio;

       … while evaluating the option `networking.hostName':

       … while evaluating definitions from `<unknown-file>, via option den.aspects.bar.provides.sub.nixos':

       … while evaluating the module argument `host' in ":anon-5:anon-1":

       … noting that argument `host` is not externally provided, so querying `_module.args` instead, requiring `config`

       (stack trace truncated; use '--show-trace' to show the full, detailed trace)

       error: attribute 'host' missing
       at /nix/store/mfgmf94yh6dxynx3bp7bdjnk8xrkz331-source/lib/modules.nix:727:13:
          726|             "noting that argument `${name}` is not externally provided, so querying `_module.args` instead, requiring `config`"
          727|             config._module.args.${name}
             |             ^
          728|           )

☢️ systems.x86_64-darwin.system-agnostic.bogus.test-minimal-mixed-merge
error:
       … while evaluating the attribute 'hostname'
         at /nix/store/8kz303qj6lzmqdfh59n6rjbz05nvm7xy-source/templates/bogus/modules/bug.nix:34:11:
           33|         expr = {
           34|           hostname = igloo.networking.hostName;
             |           ^
           35|           vim = igloo.programs.vim.enable;

       … while evaluating the attribute 'value'
         at /nix/store/mfgmf94yh6dxynx3bp7bdjnk8xrkz331-source/lib/modules.nix:1160:7:
         1159|     // {
         1160|       value = addErrorContext "while evaluating the option `${showOption loc}':" value;
             |       ^
         1161|       inherit (res.defsFinal') highestPrio;

       … while evaluating the option `networking.hostName':

       … while evaluating definitions from `<unknown-file>, via option den.aspects.bar.provides.sub.nixos':

       … while evaluating the module argument `host' in ":anon-5:anon-1":

       … noting that argument `host` is not externally provided, so querying `_module.args` instead, requiring `config`

       (stack trace truncated; use '--show-trace' to show the full, detailed trace)

       error: attribute 'host' missing
       at /nix/store/mfgmf94yh6dxynx3bp7bdjnk8xrkz331-source/lib/modules.nix:727:13:
          726|             "noting that argument `${name}` is not externally provided, so querying `_module.args` instead, requiring `config`"
          727|             config._module.args.${name}
             |             ^
          728|           )

☢️ systems.x86_64-freebsd.system-agnostic.bogus.test-minimal-mixed-merge
error:
       … while evaluating the attribute 'hostname'
         at /nix/store/8kz303qj6lzmqdfh59n6rjbz05nvm7xy-source/templates/bogus/modules/bug.nix:34:11:
           33|         expr = {
           34|           hostname = igloo.networking.hostName;
             |           ^
           35|           vim = igloo.programs.vim.enable;

       … while evaluating the attribute 'value'
         at /nix/store/mfgmf94yh6dxynx3bp7bdjnk8xrkz331-source/lib/modules.nix:1160:7:
         1159|     // {
         1160|       value = addErrorContext "while evaluating the option `${showOption loc}':" value;
             |       ^
         1161|       inherit (res.defsFinal') highestPrio;

       … while evaluating the option `networking.hostName':

       … while evaluating definitions from `<unknown-file>, via option den.aspects.bar.provides.sub.nixos':

       … while evaluating the module argument `host' in ":anon-5:anon-1":

       … noting that argument `host` is not externally provided, so querying `_module.args` instead, requiring `config`

       (stack trace truncated; use '--show-trace' to show the full, detailed trace)

       error: attribute 'host' missing
       at /nix/store/mfgmf94yh6dxynx3bp7bdjnk8xrkz331-source/lib/modules.nix:727:13:
          726|             "noting that argument `${name}` is not externally provided, so querying `_module.args` instead, requiring `config`"
          727|             config._module.args.${name}
             |             ^
          728|           )

☢️ systems.x86_64-linux.system-agnostic.bogus.test-minimal-mixed-merge
error:
       … while evaluating the attribute 'hostname'
         at /nix/store/8kz303qj6lzmqdfh59n6rjbz05nvm7xy-source/templates/bogus/modules/bug.nix:34:11:
           33|         expr = {
           34|           hostname = igloo.networking.hostName;
             |           ^
           35|           vim = igloo.programs.vim.enable;

       … while evaluating the attribute 'value'
         at /nix/store/mfgmf94yh6dxynx3bp7bdjnk8xrkz331-source/lib/modules.nix:1160:7:
         1159|     // {
         1160|       value = addErrorContext "while evaluating the option `${showOption loc}':" value;
             |       ^
         1161|       inherit (res.defsFinal') highestPrio;

       … while evaluating the option `networking.hostName':

       … while evaluating definitions from `<unknown-file>, via option den.aspects.bar.provides.sub.nixos':

       … while evaluating the module argument `host' in ":anon-5:anon-1":

       … noting that argument `host` is not externally provided, so querying `_module.args` instead, requiring `config`

       (stack trace truncated; use '--show-trace' to show the full, detailed trace)

       error: attribute 'host' missing
       at /nix/store/mfgmf94yh6dxynx3bp7bdjnk8xrkz331-source/lib/modules.nix:727:13:
          726|             "noting that argument `${name}` is not externally provided, so querying `_module.args` instead, requiring `config`"
          727|             config._module.args.${name}
             |             ^
          728|           )


😢 0/11 successful
error: Tests failed

den on  HEAD (8101ec8) [!] via ❄️  impure (devenv-shell-env)
❯

and here is testing on main: not passing


den on  main [!] via ❄️  impure (devenv-shell-env)
❯ git log -1
commit 927f4d8e2be40d05c976a91bbec66238c622bbf5 (HEAD -> main, origin/main, origin/HEAD)
Author: Jason Bowman <[email protected]>
Date:   Mon Apr 13 19:27:01 2026 -0700

    fix: make home hostName nullable for standalone homes (#452)

    Standalone home-manager configurations may not have a bound host. Change
    hostName from strOpt to nullOr str so it defaults to null when no host
    is associated.

den on  main [!] via ❄️  impure (devenv-shell-env)
❯ git ls-remote https://github.com/vic/den HEAD
927f4d8e2be40d05c976a91bbec66238c622bbf5	HEAD

den on  main [!] via ❄️  impure (devenv-shell-env)
❯ git diff
diff --git a/templates/bogus/modules/bug.nix b/templates/bogus/modules/bug.nix
index e9782ec..9df4ea4 100644
--- a/templates/bogus/modules/bug.nix
+++ b/templates/bogus/modules/bug.nix
@@ -2,23 +2,42 @@
 {
   flake.tests.bogus = {

-    test-something = denTest (
+    test-minimal-mixed-merge = denTest (
       {
         den,
         lib,
-        igloo, # igloo = nixosConfigurations.igloo.config
-        tuxHm, # tuxHm = igloo.home-manager.users.tux
+        igloo,
         ...
       }:
       {
-        # replace <system> if you are reporting a bug in MacOS
         den.hosts.x86_64-linux.igloo.users.tux = { };

-        # do something for testing
-        den.aspects.tux.user.description = "The Penguin";
+        imports =
+          let
+            # Bare function at _.sub
...skipping...
+              den.aspects.bar._.sub = { host, ... }: {
+                nixos.networking.hostName = host.hostName;
+              };
+            };

-        expr = igloo.users.users.tux.description;
-        expected = "The Penguin";
+            # Plain attrset at the SAME _.sub
+            attrset-def = {
+              den.aspects.bar._.sub.nixos.programs.vim.enable = true;
+            };
+          in
+          [ fn-def attrset-def ];
+
+        den.aspects.igloo.includes = [ den.aspects.bar._.sub ];
+
+        expr = {
+          hostname = igloo.networking.hostName;
+          vim = igloo.programs.vim.enable;
+        };
+        expected = {
+          hostname = "igloo";
+          vim = true;
+        };
       }
     );


den on  main [!] via ❄️  impure (devenv-shell-env)
❯ , nix-unit --flake ./templates/bogus#tests --override-input den .
warning: unknown setting 'allowed-users'
warning: unknown setting 'trusted-users'
warning: `--gc-roots-dir' not specified
warning: Git tree '/home/horyzon/persist/monastery/needs-sorting/joining-den-content-20260406181223/20260413014345/den' is dirty
warning: not writing modified lock file of flake 'git+file:///home/horyzon/persist/monastery/needs-sorting/joining-den-content-20260406181223/20260413014345/den?dir=templates/bogus':
• Updated input 'den':
    'github:vic/den/53c30ea9acbd357077defec263066506771e9630?narHash=sha256-9GuRhcEA8YoYa1XYeJxBP0V5H%2BGn4pH41cgQHe3hL5M%3D' (2026-04-07)
  → 'git+file:///home/horyzon/persist/monastery/needs-sorting/joining-den-content-20260406181223/20260413014345/den' (2026-04-14)
☢️ bogus.test-minimal-mixed-merge
error:
       … while evaluating the attribute 'hostname'
         at /nix/store/qig2ik7vdhpi2vwzbz3cwhpfp4nbcnr9-source/templates/bogus/modules/bug.nix:34:11:
           33|         expr = {
           34|           hostname = igloo.networking.hostName;
             |           ^
           35|           vim = igloo.programs.vim.enable;

       … while evaluating the attribute 'value'
         at /nix/store/mfgmf94yh6dxynx3bp7bdjnk8xrkz331-source/lib/modules.nix:1160:7:
         1159|     // {
         1160|       value = addErrorContext "while evaluating the option `${showOption loc}':" value;
             |       ^
         1161|       inherit (res.defsFinal') highestPrio;

       … while evaluating the option `networking.hostName':

       … while evaluating definitions from `<unknown-file>, via option den.aspects.bar.provides.sub.nixos':

       … while evaluating the module argument `host' in ":anon-5:anon-1":

       … noting that argument `host` is not externally provided, so querying `_module.args` instead, requiring `config`

       (stack trace truncated; use '--show-trace' to show the full, detailed trace)

       error: attribute 'host' missing
       at /nix/store/mfgmf94yh6dxynx3bp7bdjnk8xrkz331-source/lib/modules.nix:727:13:
          726|             "noting that argument `${name}` is not externally provided, so querying `_module.args` instead, requiring `config`"
          727|             config._module.args.${name}
             |             ^
          728|           )

☢️ systems.aarch64-darwin.system-agnostic.bogus.test-minimal-mixed-merge
error:
       … while evaluating the attribute 'hostname'
         at /nix/store/qig2ik7vdhpi2vwzbz3cwhpfp4nbcnr9-source/templates/bogus/modules/bug.nix:34:11:
           33|         expr = {
           34|           hostname = igloo.networking.hostName;
             |           ^
           35|           vim = igloo.programs.vim.enable;

       … while evaluating the attribute 'value'
         at /nix/store/mfgmf94yh6dxynx3bp7bdjnk8xrkz331-source/lib/modules.nix:1160:7:
         1159|     // {
         1160|       value = addErrorContext "while evaluating the option `${showOption loc}':" value;
             |       ^
         1161|       inherit (res.defsFinal') highestPrio;

       … while evaluating the option `networking.hostName':

       … while evaluating definitions from `<unknown-file>, via option den.aspects.bar.provides.sub.nixos':

       … while evaluating the module argument `host' in ":anon-5:anon-1":

       … noting that argument `host` is not externally provided, so querying `_module.args` instead, requiring `config`

       (stack trace truncated; use '--show-trace' to show the full, detailed trace)

       error: attribute 'host' missing
       at /nix/store/mfgmf94yh6dxynx3bp7bdjnk8xrkz331-source/lib/modules.nix:727:13:
          726|             "noting that argument `${name}` is not externally provided, so querying `_module.args` instead, requiring `config`"
          727|             config._module.args.${name}
             |             ^
          728|           )

☢️ systems.aarch64-linux.system-agnostic.bogus.test-minimal-mixed-merge
error:
       … while evaluating the attribute 'hostname'
         at /nix/store/qig2ik7vdhpi2vwzbz3cwhpfp4nbcnr9-source/templates/bogus/modules/bug.nix:34:11:
           33|         expr = {
           34|           hostname = igloo.networking.hostName;
             |           ^
           35|           vim = igloo.programs.vim.enable;

       … while evaluating the attribute 'value'
         at /nix/store/mfgmf94yh6dxynx3bp7bdjnk8xrkz331-source/lib/modules.nix:1160:7:
         1159|     // {
         1160|       value = addErrorContext "while evaluating the option `${showOption loc}':" value;
             |       ^
         1161|       inherit (res.defsFinal') highestPrio;

       … while evaluating the option `networking.hostName':

       … while evaluating definitions from `<unknown-file>, via option den.aspects.bar.provides.sub.nixos':

       … while evaluating the module argument `host' in ":anon-5:anon-1":

       … noting that argument `host` is not externally provided, so querying `_module.args` instead, requiring `config`

       (stack trace truncated; use '--show-trace' to show the full, detailed trace)

       error: attribute 'host' missing
       at /nix/store/mfgmf94yh6dxynx3bp7bdjnk8xrkz331-source/lib/modules.nix:727:13:
          726|             "noting that argument `${name}` is not externally provided, so querying `_module.args` instead, requiring `config`"
          727|             config._module.args.${name}
             |             ^
          728|           )

☢️ systems.armv6l-linux.system-agnostic.bogus.test-minimal-mixed-merge
error:
       … while evaluating the attribute 'hostname'
         at /nix/store/qig2ik7vdhpi2vwzbz3cwhpfp4nbcnr9-source/templates/bogus/modules/bug.nix:34:11:
           33|         expr = {
           34|           hostname = igloo.networking.hostName;
             |           ^
           35|           vim = igloo.programs.vim.enable;

       … while evaluating the attribute 'value'
         at /nix/store/mfgmf94yh6dxynx3bp7bdjnk8xrkz331-source/lib/modules.nix:1160:7:
         1159|     // {
         1160|       value = addErrorContext "while evaluating the option `${showOption loc}':" value;
             |       ^
         1161|       inherit (res.defsFinal') highestPrio;

       … while evaluating the option `networking.hostName':

       … while evaluating definitions from `<unknown-file>, via option den.aspects.bar.provides.sub.nixos':

       … while evaluating the module argument `host' in ":anon-5:anon-1":

       … noting that argument `host` is not externally provided, so querying `_module.args` instead, requiring `config`

       (stack trace truncated; use '--show-trace' to show the full, detailed trace)

       error: attribute 'host' missing
       at /nix/store/mfgmf94yh6dxynx3bp7bdjnk8xrkz331-source/lib/modules.nix:727:13:
          726|             "noting that argument `${name}` is not externally provided, so querying `_module.args` instead, requiring `config`"
          727|             config._module.args.${name}
             |             ^
          728|           )

☢️ systems.armv7l-linux.system-agnostic.bogus.test-minimal-mixed-merge
error:
       … while evaluating the attribute 'hostname'
         at /nix/store/qig2ik7vdhpi2vwzbz3cwhpfp4nbcnr9-source/templates/bogus/modules/bug.nix:34:11:
           33|         expr = {
           34|           hostname = igloo.networking.hostName;
             |           ^
           35|           vim = igloo.programs.vim.enable;

       … while evaluating the attribute 'value'
         at /nix/store/mfgmf94yh6dxynx3bp7bdjnk8xrkz331-source/lib/modules.nix:1160:7:
         1159|     // {
         1160|       value = addErrorContext "while evaluating the option `${showOption loc}':" value;
             |       ^
         1161|       inherit (res.defsFinal') highestPrio;

       … while evaluating the option `networking.hostName':

       … while evaluating definitions from `<unknown-file>, via option den.aspects.bar.provides.sub.nixos':

       … while evaluating the module argument `host' in ":anon-5:anon-1":

       … noting that argument `host` is not externally provided, so querying `_module.args` instead, requiring `config`

       (stack trace truncated; use '--show-trace' to show the full, detailed trace)

       error: attribute 'host' missing
       at /nix/store/mfgmf94yh6dxynx3bp7bdjnk8xrkz331-source/lib/modules.nix:727:13:
          726|             "noting that argument `${name}` is not externally provided, so querying `_module.args` instead, requiring `config`"
          727|             config._module.args.${name}
             |             ^
          728|           )

☢️ systems.i686-linux.system-agnostic.bogus.test-minimal-mixed-merge
error:
       … while evaluating the attribute 'hostname'
         at /nix/store/qig2ik7vdhpi2vwzbz3cwhpfp4nbcnr9-source/templates/bogus/modules/bug.nix:34:11:
           33|         expr = {
           34|           hostname = igloo.networking.hostName;
             |           ^
           35|           vim = igloo.programs.vim.enable;

       … while evaluating the attribute 'value'
         at /nix/store/mfgmf94yh6dxynx3bp7bdjnk8xrkz331-source/lib/modules.nix:1160:7:
         1159|     // {
         1160|       value = addErrorContext "while evaluating the option `${showOption loc}':" value;
             |       ^
         1161|       inherit (res.defsFinal') highestPrio;

       … while evaluating the option `networking.hostName':

       … while evaluating definitions from `<unknown-file>, via option den.aspects.bar.provides.sub.nixos':

       … while evaluating the module argument `host' in ":anon-5:anon-1":

       … noting that argument `host` is not externally provided, so querying `_module.args` instead, requiring `config`

       (stack trace truncated; use '--show-trace' to show the full, detailed trace)

       error: attribute 'host' missing
       at /nix/store/mfgmf94yh6dxynx3bp7bdjnk8xrkz331-source/lib/modules.nix:727:13:
          726|             "noting that argument `${name}` is not externally provided, so querying `_module.args` instead, requiring `config`"
          727|             config._module.args.${name}
             |             ^
          728|           )

☢️ systems.powerpc64le-linux.system-agnostic.bogus.test-minimal-mixed-merge
error:
       … while evaluating the attribute 'hostname'
         at /nix/store/qig2ik7vdhpi2vwzbz3cwhpfp4nbcnr9-source/templates/bogus/modules/bug.nix:34:11:
           33|         expr = {
           34|           hostname = igloo.networking.hostName;
             |           ^
           35|           vim = igloo.programs.vim.enable;

       … while evaluating the attribute 'value'
         at /nix/store/mfgmf94yh6dxynx3bp7bdjnk8xrkz331-source/lib/modules.nix:1160:7:
         1159|     // {
         1160|       value = addErrorContext "while evaluating the option `${showOption loc}':" value;
             |       ^
         1161|       inherit (res.defsFinal') highestPrio;

       … while evaluating the option `networking.hostName':

       … while evaluating definitions from `<unknown-file>, via option den.aspects.bar.provides.sub.nixos':

       … while evaluating the module argument `host' in ":anon-5:anon-1":

       … noting that argument `host` is not externally provided, so querying `_module.args` instead, requiring `config`

       (stack trace truncated; use '--show-trace' to show the full, detailed trace)

       error: attribute 'host' missing
       at /nix/store/mfgmf94yh6dxynx3bp7bdjnk8xrkz331-source/lib/modules.nix:727:13:
          726|             "noting that argument `${name}` is not externally provided, so querying `_module.args` instead, requiring `config`"
          727|             config._module.args.${name}
             |             ^
          728|           )

☢️ systems.riscv64-linux.system-agnostic.bogus.test-minimal-mixed-merge
error:
       … while evaluating the attribute 'hostname'
         at /nix/store/qig2ik7vdhpi2vwzbz3cwhpfp4nbcnr9-source/templates/bogus/modules/bug.nix:34:11:
           33|         expr = {
           34|           hostname = igloo.networking.hostName;
             |           ^
           35|           vim = igloo.programs.vim.enable;

       … while evaluating the attribute 'value'
         at /nix/store/mfgmf94yh6dxynx3bp7bdjnk8xrkz331-source/lib/modules.nix:1160:7:
         1159|     // {
         1160|       value = addErrorContext "while evaluating the option `${showOption loc}':" value;
             |       ^
         1161|       inherit (res.defsFinal') highestPrio;

       … while evaluating the option `networking.hostName':

       … while evaluating definitions from `<unknown-file>, via option den.aspects.bar.provides.sub.nixos':

       … while evaluating the module argument `host' in ":anon-5:anon-1":

       … noting that argument `host` is not externally provided, so querying `_module.args` instead, requiring `config`

       (stack trace truncated; use '--show-trace' to show the full, detailed trace)

       error: attribute 'host' missing
       at /nix/store/mfgmf94yh6dxynx3bp7bdjnk8xrkz331-source/lib/modules.nix:727:13:
          726|             "noting that argument `${name}` is not externally provided, so querying `_module.args` instead, requiring `config`"
          727|             config._module.args.${name}
             |             ^
          728|           )

☢️ systems.x86_64-darwin.system-agnostic.bogus.test-minimal-mixed-merge
error:
       … while evaluating the attribute 'hostname'
         at /nix/store/qig2ik7vdhpi2vwzbz3cwhpfp4nbcnr9-source/templates/bogus/modules/bug.nix:34:11:
           33|         expr = {
           34|           hostname = igloo.networking.hostName;
             |           ^
           35|           vim = igloo.programs.vim.enable;

       … while evaluating the attribute 'value'
         at /nix/store/mfgmf94yh6dxynx3bp7bdjnk8xrkz331-source/lib/modules.nix:1160:7:
         1159|     // {
         1160|       value = addErrorContext "while evaluating the option `${showOption loc}':" value;
             |       ^
         1161|       inherit (res.defsFinal') highestPrio;

       … while evaluating the option `networking.hostName':

       … while evaluating definitions from `<unknown-file>, via option den.aspects.bar.provides.sub.nixos':

       … while evaluating the module argument `host' in ":anon-5:anon-1":

       … noting that argument `host` is not externally provided, so querying `_module.args` instead, requiring `config`

       (stack trace truncated; use '--show-trace' to show the full, detailed trace)

       error: attribute 'host' missing
       at /nix/store/mfgmf94yh6dxynx3bp7bdjnk8xrkz331-source/lib/modules.nix:727:13:
          726|             "noting that argument `${name}` is not externally provided, so querying `_module.args` instead, requiring `config`"
          727|             config._module.args.${name}
             |             ^
          728|           )

☢️ systems.x86_64-freebsd.system-agnostic.bogus.test-minimal-mixed-merge
error:
       … while evaluating the attribute 'hostname'
         at /nix/store/qig2ik7vdhpi2vwzbz3cwhpfp4nbcnr9-source/templates/bogus/modules/bug.nix:34:11:
           33|         expr = {
           34|           hostname = igloo.networking.hostName;
             |           ^
           35|           vim = igloo.programs.vim.enable;

       … while evaluating the attribute 'value'
         at /nix/store/mfgmf94yh6dxynx3bp7bdjnk8xrkz331-source/lib/modules.nix:1160:7:
         1159|     // {
         1160|       value = addErrorContext "while evaluating the option `${showOption loc}':" value;
             |       ^
         1161|       inherit (res.defsFinal') highestPrio;

       … while evaluating the option `networking.hostName':

       … while evaluating definitions from `<unknown-file>, via option den.aspects.bar.provides.sub.nixos':

       … while evaluating the module argument `host' in ":anon-5:anon-1":

       … noting that argument `host` is not externally provided, so querying `_module.args` instead, requiring `config`

       (stack trace truncated; use '--show-trace' to show the full, detailed trace)

       error: attribute 'host' missing
       at /nix/store/mfgmf94yh6dxynx3bp7bdjnk8xrkz331-source/lib/modules.nix:727:13:
          726|             "noting that argument `${name}` is not externally provided, so querying `_module.args` instead, requiring `config`"
          727|             config._module.args.${name}
             |             ^
          728|           )

☢️ systems.x86_64-linux.system-agnostic.bogus.test-minimal-mixed-merge
error:
       … while evaluating the attribute 'hostname'
         at /nix/store/qig2ik7vdhpi2vwzbz3cwhpfp4nbcnr9-source/templates/bogus/modules/bug.nix:34:11:
           33|         expr = {
           34|           hostname = igloo.networking.hostName;
             |           ^
           35|           vim = igloo.programs.vim.enable;

       … while evaluating the attribute 'value'
         at /nix/store/mfgmf94yh6dxynx3bp7bdjnk8xrkz331-source/lib/modules.nix:1160:7:
         1159|     // {
         1160|       value = addErrorContext "while evaluating the option `${showOption loc}':" value;
             |       ^
         1161|       inherit (res.defsFinal') highestPrio;

       … while evaluating the option `networking.hostName':

       … while evaluating definitions from `<unknown-file>, via option den.aspects.bar.provides.sub.nixos':

       … while evaluating the module argument `host' in ":anon-5:anon-1":

       … noting that argument `host` is not externally provided, so querying `_module.args` instead, requiring `config`

       (stack trace truncated; use '--show-trace' to show the full, detailed trace)

       error: attribute 'host' missing
       at /nix/store/mfgmf94yh6dxynx3bp7bdjnk8xrkz331-source/lib/modules.nix:727:13:
          726|             "noting that argument `${name}` is not externally provided, so querying `_module.args` instead, requiring `config`"
          727|             config._module.args.${name}
             |             ^
          728|           )


😢 0/11 successful
error: Tests failed

den on  main [!] via ❄️  impure (devenv-shell-env)
❯

kalyanoliveira avatar Apr 14 '26 23:04 kalyanoliveira

Okay, so not a recent regression. You're welcome to try my fork and see if it behaves differently? I'm curious as well, but neck deep in the overall refactor. The most comprehensive branch right now of sini/den is feat/diag-api.

sini avatar Apr 15 '26 00:04 sini

To use the fx pipeline you need to bring in a flake input for vic/nix-effects (see the ci flake.nix) and set den.fxPipeline = true

sini avatar Apr 15 '26 00:04 sini

I got den.fxEnabled missing as an option

Did you perhaps mean to say den.fxPipeline?

kalyanoliveira avatar Apr 15 '26 00:04 kalyanoliveira

I mean I see it here https://github.com/sini/den/blob/feat/diag-api/templates/ci/modules/features/fx-flag.nix

kalyanoliveira avatar Apr 15 '26 00:04 kalyanoliveira

Yes. 🐑

sini avatar Apr 15 '26 00:04 sini

then it's not working there too, sorry lol

den on  main [!] via ❄️  impure (devenv-shell-env)
❯ git log -1 --oneline
927f4d8 (HEAD -> main, origin/main, origin/HEAD) fix: make home hostName nullable for standalone homes (#452)

den on  main [!] via ❄️  impure (devenv-shell-env)
❯ git ls-remote https://github.com/vic/den HEAD
927f4d8e2be40d05c976a91bbec66238c622bbf5	HEAD

den on  main [!] via ❄️  impure (devenv-shell-env)
❯ git status
On branch main
Your branch is up to date with 'origin/main'.

Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git restore <file>..." to discard changes in working directory)
	modified:   templates/bogus/flake.lock
	modified:   templates/bogus/flake.nix
	modified:   templates/bogus/modules/bug.nix

no changes added to commit (use "git add" and/or "git commit -a")

den on  main [!] via ❄️  impure (devenv-shell-env)
❯ git diff templates/bogus/flake.nix
diff --git a/templates/bogus/flake.nix b/templates/bogus/flake.nix
index 6fa77b5..e842895 100644
--- a/templates/bogus/flake.nix
+++ b/templates/bogus/flake.nix
@@ -4,7 +4,10 @@
   inputs = {
     nixpkgs.url = "https://channels.nixos.org/nixpkgs-unstable/nixexprs.tar.xz";
     import-tree.url = "github:vic/import-tree";
-    den.url = "github:vic/den/main";
+    den.url = "github:sini/den/feat/diag-api";
+    nix-effects.url = "github:vic/nix-effects";
+    nix-effects.inputs.nixpkgs.follows = "nixpkgs";
+    nix-effects.inputs.nix-unit.follows = "nix-unit";

     flake-parts = {
       url = "github:hercules-ci/flake-parts";

den on  main [!] via ❄️  impure (devenv-shell-env)
❯ git --no-pager diff templates/bogus/modules/bug.nix
diff --git a/templates/bogus/modules/bug.nix b/templates/bogus/modules/bug.nix
index e9782ec..f2897b0 100644
--- a/templates/bogus/modules/bug.nix
+++ b/templates/bogus/modules/bug.nix
@@ -2,23 +2,43 @@
 {
   flake.tests.bogus = {

-    test-something = denTest (
+    test-minimal-mixed-merge = denTest (
       {
         den,
         lib,
-        igloo, # igloo = nixosConfigurations.igloo.config
-        tuxHm, # tuxHm = igloo.home-manager.users.tux
+        igloo,
         ...
       }:
       {
-        # replace <system> if you are reporting a bug in MacOS
+        den.fxPipeline = true;
         den.hosts.x86_64-linux.igloo.users.tux = { };

-        # do something for testing
-        den.aspects.tux.user.description = "The Penguin";
+        imports =
+          let
+            # Bare function at _.sub
+            fn-def = {
+              den.aspects.bar._.sub = { host, ... }: {
+                nixos.networking.hostName = host.hostName;
+              };
+            };

-        expr = igloo.users.users.tux.description;
-        expected = "The Penguin";
+            # Plain attrset at the SAME _.sub
+            attrset-def = {
+              den.aspects.bar._.sub.nixos.programs.vim.enable = true;
+            };
+          in
+          [ fn-def attrset-def ];
+
+        den.aspects.igloo.includes = [ den.aspects.bar._.sub ];
+
+        expr = {
+          hostname = igloo.networking.hostName;
+          vim = igloo.programs.vim.enable;
+        };
+        expected = {
+          hostname = "igloo";
+          vim = true;
+        };
       }
     );


den on  main [!] via ❄️  impure (devenv-shell-env)
❯ y

den/templates/bogus on  main [!] via ❄️  impure (devenv-shell-env) took 4s
❯ nix flake update
warning: Git tree '/home/horyzon/persist/monastery/needs-sorting/joining-den-content-20260406181223/20260413014345/den' is dirty
warning: updating lock file "/home/horyzon/persist/monastery/needs-sorting/joining-den-content-20260406181223/20260413014345/den/templates/bogus/flake.lock":
• Updated input 'den':
    'github:sini/den/7a9bca800c73289d45b6f7289278291318f92524?narHash=sha256-l74rM9dKeM%2BrAys6ALeo1Fji1DnG%2Bxc%2BA5OTzs/PpHU%3D' (2026-04-15)
  → 'github:sini/den/929dcbabca6f597aa393a4eded1520c66c8e5519?narHash=sha256-oOaa02og4HPdIPFrjQJ3RoNuBr/fFoKbQf9sUv%2Bhv5o%3D' (2026-04-15)

den/templates/bogus on  main [!] via ❄️  impure (devenv-shell-env) took 2s
❯ , nix-unit --flake .#tests
warning: unknown setting 'allowed-users'
warning: unknown setting 'trusted-users'
warning: `--gc-roots-dir' not specified
warning: Git tree '/home/horyzon/persist/monastery/needs-sorting/joining-den-content-20260406181223/20260413014345/den' is dirty
☢️ bogus.test-minimal-mixed-merge
error:
       … while evaluating the attribute 'vim'
         at /nix/store/vxk7c4qr400ql46aw0hl7ra9phapbdja-source/templates/bogus/modules/bug.nix:36:11:
           35|           hostname = igloo.networking.hostName;
           36|           vim = igloo.programs.vim.enable;
             |           ^
           37|         };

       … while evaluating the module argument `igloo' in ":anon-1":

       … noting that argument `igloo` is not externally provided, so querying `_module.args` instead, requiring `config`

       … while evaluating definitions from `<unknown-file>':

       … while evaluating the module argument `host' in ":anon-5:anon-1":

       … noting that argument `host` is not externally provided, so querying `_module.args` instead, requiring `config`

       (stack trace truncated; use '--show-trace' to show the full, detailed trace)

       error: attribute 'host' missing
       at /nix/store/cw6dilbw3gba38jhv5zaz8samzlb0f1w-source/lib/modules.nix:726:13:
          725|             "noting that argument `${name}` is not externally provided, so querying `_module.args` instead, requiring `config`"
          726|             config._module.args.${name}
             |             ^
          727|           )

☢️ systems.aarch64-darwin.system-agnostic.bogus.test-minimal-mixed-merge
error:
       … while evaluating the attribute 'vim'
         at /nix/store/vxk7c4qr400ql46aw0hl7ra9phapbdja-source/templates/bogus/modules/bug.nix:36:11:
           35|           hostname = igloo.networking.hostName;
           36|           vim = igloo.programs.vim.enable;
             |           ^
           37|         };

       … while evaluating the module argument `igloo' in ":anon-1":

       … noting that argument `igloo` is not externally provided, so querying `_module.args` instead, requiring `config`

       … while evaluating definitions from `<unknown-file>':

       … while evaluating the module argument `host' in ":anon-5:anon-1":

       … noting that argument `host` is not externally provided, so querying `_module.args` instead, requiring `config`

       (stack trace truncated; use '--show-trace' to show the full, detailed trace)

       error: attribute 'host' missing
       at /nix/store/cw6dilbw3gba38jhv5zaz8samzlb0f1w-source/lib/modules.nix:726:13:
          725|             "noting that argument `${name}` is not externally provided, so querying `_module.args` instead, requiring `config`"
          726|             config._module.args.${name}
             |             ^
          727|           )

☢️ systems.aarch64-linux.system-agnostic.bogus.test-minimal-mixed-merge
error:
       … while evaluating the attribute 'vim'
         at /nix/store/vxk7c4qr400ql46aw0hl7ra9phapbdja-source/templates/bogus/modules/bug.nix:36:11:
           35|           hostname = igloo.networking.hostName;
           36|           vim = igloo.programs.vim.enable;
             |           ^
           37|         };

       … while evaluating the module argument `igloo' in ":anon-1":

       … noting that argument `igloo` is not externally provided, so querying `_module.args` instead, requiring `config`

       … while evaluating definitions from `<unknown-file>':

       … while evaluating the module argument `host' in ":anon-5:anon-1":

       … noting that argument `host` is not externally provided, so querying `_module.args` instead, requiring `config`

       (stack trace truncated; use '--show-trace' to show the full, detailed trace)

       error: attribute 'host' missing
       at /nix/store/cw6dilbw3gba38jhv5zaz8samzlb0f1w-source/lib/modules.nix:726:13:
          725|             "noting that argument `${name}` is not externally provided, so querying `_module.args` instead, requiring `config`"
          726|             config._module.args.${name}
             |             ^
          727|           )

☢️ systems.armv6l-linux.system-agnostic.bogus.test-minimal-mixed-merge
error:
       … while evaluating the attribute 'vim'
         at /nix/store/vxk7c4qr400ql46aw0hl7ra9phapbdja-source/templates/bogus/modules/bug.nix:36:11:
           35|           hostname = igloo.networking.hostName;
           36|           vim = igloo.programs.vim.enable;
             |           ^
           37|         };

       … while evaluating the module argument `igloo' in ":anon-1":

       … noting that argument `igloo` is not externally provided, so querying `_module.args` instead, requiring `config`

       … while evaluating definitions from `<unknown-file>':

       … while evaluating the module argument `host' in ":anon-5:anon-1":

       … noting that argument `host` is not externally provided, so querying `_module.args` instead, requiring `config`

       (stack trace truncated; use '--show-trace' to show the full, detailed trace)

       error: attribute 'host' missing
       at /nix/store/cw6dilbw3gba38jhv5zaz8samzlb0f1w-source/lib/modules.nix:726:13:
          725|             "noting that argument `${name}` is not externally provided, so querying `_module.args` instead, requiring `config`"
          726|             config._module.args.${name}
             |             ^
          727|           )

☢️ systems.armv7l-linux.system-agnostic.bogus.test-minimal-mixed-merge
error:
       … while evaluating the attribute 'vim'
         at /nix/store/vxk7c4qr400ql46aw0hl7ra9phapbdja-source/templates/bogus/modules/bug.nix:36:11:
           35|           hostname = igloo.networking.hostName;
           36|           vim = igloo.programs.vim.enable;
             |           ^
           37|         };

       … while evaluating the module argument `igloo' in ":anon-1":

       … noting that argument `igloo` is not externally provided, so querying `_module.args` instead, requiring `config`

       … while evaluating definitions from `<unknown-file>':

       … while evaluating the module argument `host' in ":anon-5:anon-1":

       … noting that argument `host` is not externally provided, so querying `_module.args` instead, requiring `config`

       (stack trace truncated; use '--show-trace' to show the full, detailed trace)

       error: attribute 'host' missing
       at /nix/store/cw6dilbw3gba38jhv5zaz8samzlb0f1w-source/lib/modules.nix:726:13:
          725|             "noting that argument `${name}` is not externally provided, so querying `_module.args` instead, requiring `config`"
          726|             config._module.args.${name}
             |             ^
          727|           )

☢️ systems.i686-linux.system-agnostic.bogus.test-minimal-mixed-merge
error:
       … while evaluating the attribute 'vim'
         at /nix/store/vxk7c4qr400ql46aw0hl7ra9phapbdja-source/templates/bogus/modules/bug.nix:36:11:
           35|           hostname = igloo.networking.hostName;
           36|           vim = igloo.programs.vim.enable;
             |           ^
           37|         };

       … while evaluating the module argument `igloo' in ":anon-1":

       … noting that argument `igloo` is not externally provided, so querying `_module.args` instead, requiring `config`

       … while evaluating definitions from `<unknown-file>':

       … while evaluating the module argument `host' in ":anon-5:anon-1":

       … noting that argument `host` is not externally provided, so querying `_module.args` instead, requiring `config`

       (stack trace truncated; use '--show-trace' to show the full, detailed trace)

       error: attribute 'host' missing
       at /nix/store/cw6dilbw3gba38jhv5zaz8samzlb0f1w-source/lib/modules.nix:726:13:
          725|             "noting that argument `${name}` is not externally provided, so querying `_module.args` instead, requiring `config`"
          726|             config._module.args.${name}
             |             ^
          727|           )

☢️ systems.powerpc64le-linux.system-agnostic.bogus.test-minimal-mixed-merge
error:
       … while evaluating the attribute 'vim'
         at /nix/store/vxk7c4qr400ql46aw0hl7ra9phapbdja-source/templates/bogus/modules/bug.nix:36:11:
           35|           hostname = igloo.networking.hostName;
           36|           vim = igloo.programs.vim.enable;
             |           ^
           37|         };

       … while evaluating the module argument `igloo' in ":anon-1":

       … noting that argument `igloo` is not externally provided, so querying `_module.args` instead, requiring `config`

       … while evaluating definitions from `<unknown-file>':

       … while evaluating the module argument `host' in ":anon-5:anon-1":

       … noting that argument `host` is not externally provided, so querying `_module.args` instead, requiring `config`

       (stack trace truncated; use '--show-trace' to show the full, detailed trace)

       error: attribute 'host' missing
       at /nix/store/cw6dilbw3gba38jhv5zaz8samzlb0f1w-source/lib/modules.nix:726:13:
          725|             "noting that argument `${name}` is not externally provided, so querying `_module.args` instead, requiring `config`"
          726|             config._module.args.${name}
             |             ^
          727|           )

☢️ systems.riscv64-linux.system-agnostic.bogus.test-minimal-mixed-merge
error:
       … while evaluating the attribute 'vim'
         at /nix/store/vxk7c4qr400ql46aw0hl7ra9phapbdja-source/templates/bogus/modules/bug.nix:36:11:
           35|           hostname = igloo.networking.hostName;
           36|           vim = igloo.programs.vim.enable;
             |           ^
           37|         };

       … while evaluating the module argument `igloo' in ":anon-1":

       … noting that argument `igloo` is not externally provided, so querying `_module.args` instead, requiring `config`

       … while evaluating definitions from `<unknown-file>':

       … while evaluating the module argument `host' in ":anon-5:anon-1":

       … noting that argument `host` is not externally provided, so querying `_module.args` instead, requiring `config`

       (stack trace truncated; use '--show-trace' to show the full, detailed trace)

       error: attribute 'host' missing
       at /nix/store/cw6dilbw3gba38jhv5zaz8samzlb0f1w-source/lib/modules.nix:726:13:
          725|             "noting that argument `${name}` is not externally provided, so querying `_module.args` instead, requiring `config`"
          726|             config._module.args.${name}
             |             ^
          727|           )

☢️ systems.x86_64-darwin.system-agnostic.bogus.test-minimal-mixed-merge
error:
       … while evaluating the attribute 'vim'
         at /nix/store/vxk7c4qr400ql46aw0hl7ra9phapbdja-source/templates/bogus/modules/bug.nix:36:11:
           35|           hostname = igloo.networking.hostName;
           36|           vim = igloo.programs.vim.enable;
             |           ^
           37|         };

       … while evaluating the module argument `igloo' in ":anon-1":

       … noting that argument `igloo` is not externally provided, so querying `_module.args` instead, requiring `config`

       … while evaluating definitions from `<unknown-file>':

       … while evaluating the module argument `host' in ":anon-5:anon-1":

       … noting that argument `host` is not externally provided, so querying `_module.args` instead, requiring `config`

       (stack trace truncated; use '--show-trace' to show the full, detailed trace)

       error: attribute 'host' missing
       at /nix/store/cw6dilbw3gba38jhv5zaz8samzlb0f1w-source/lib/modules.nix:726:13:
          725|             "noting that argument `${name}` is not externally provided, so querying `_module.args` instead, requiring `config`"
          726|             config._module.args.${name}
             |             ^
          727|           )

☢️ systems.x86_64-freebsd.system-agnostic.bogus.test-minimal-mixed-merge
error:
       … while evaluating the attribute 'vim'
         at /nix/store/vxk7c4qr400ql46aw0hl7ra9phapbdja-source/templates/bogus/modules/bug.nix:36:11:
           35|           hostname = igloo.networking.hostName;
           36|           vim = igloo.programs.vim.enable;
             |           ^
           37|         };

       … while evaluating the module argument `igloo' in ":anon-1":

       … noting that argument `igloo` is not externally provided, so querying `_module.args` instead, requiring `config`

       … while evaluating definitions from `<unknown-file>':

       … while evaluating the module argument `host' in ":anon-5:anon-1":

       … noting that argument `host` is not externally provided, so querying `_module.args` instead, requiring `config`

       (stack trace truncated; use '--show-trace' to show the full, detailed trace)

       error: attribute 'host' missing
       at /nix/store/cw6dilbw3gba38jhv5zaz8samzlb0f1w-source/lib/modules.nix:726:13:
          725|             "noting that argument `${name}` is not externally provided, so querying `_module.args` instead, requiring `config`"
          726|             config._module.args.${name}
             |             ^
          727|           )

☢️ systems.x86_64-linux.system-agnostic.bogus.test-minimal-mixed-merge
error:
       … while evaluating the attribute 'vim'
         at /nix/store/vxk7c4qr400ql46aw0hl7ra9phapbdja-source/templates/bogus/modules/bug.nix:36:11:
           35|           hostname = igloo.networking.hostName;
           36|           vim = igloo.programs.vim.enable;
             |           ^
           37|         };

       … while evaluating the module argument `igloo' in ":anon-1":

       … noting that argument `igloo` is not externally provided, so querying `_module.args` instead, requiring `config`

       … while evaluating definitions from `<unknown-file>':

       … while evaluating the module argument `host' in ":anon-5:anon-1":

       … noting that argument `host` is not externally provided, so querying `_module.args` instead, requiring `config`

       (stack trace truncated; use '--show-trace' to show the full, detailed trace)

       error: attribute 'host' missing
       at /nix/store/cw6dilbw3gba38jhv5zaz8samzlb0f1w-source/lib/modules.nix:726:13:
          725|             "noting that argument `${name}` is not externally provided, so querying `_module.args` instead, requiring `config`"
          726|             config._module.args.${name}
             |             ^
          727|           )


😢 0/11 successful
error: Tests failed

den/templates/bogus on  main [!] via ❄️  impure (devenv-shell-env)
❯

kalyanoliveira avatar Apr 15 '26 00:04 kalyanoliveira

Alright. I've noted your pattern and will keep it in mind for my next task after fx, which is figuring out how to properly encapsulate aspects and preserve their taxonomy beyond the current wrapper composition pattern.

sini avatar Apr 15 '26 00:04 sini

Should be fixed, re-open if not.

sini avatar Apr 17 '26 18:04 sini