!wfudwzqQUiJYJnqfSY:nixos.org

NixOS Module System

175 Members
35 Servers

You have reached the beginning of time (for this room).


SenderMessageTime
20 Jul 2025
@x10an14:matrix.orgx10an14I want/need both, and it's the 1st of those two that I got stuck on/struggled with14:48:51
@n4ch723hr3r:nope.chat@n4ch723hr3r:nope.chat

so in the second file you do:

  options.flake.modules.foo = lib.mkOption {
    type =
      with lib.types;
      attrsOf (
        submodule (
          { name, ... }:
          {
            options = {
              home-manager = lib.mkOption {
......
14:50:09
@n4ch723hr3r:nope.chat@n4ch723hr3r:nope.chatthats at least how i understood this attrsOf extending14:50:58
@x10an14:matrix.orgx10an14

the inherits in the let ... in block in the 2nd file error out for me, no such value/attrs present:

2025-07-20 15:50:27+02:00 ~/Doc/sr./nix-parts-conf w/❄️nix-shell-envtook 17s
x10an14@home-desktop ❯ : nix eval --json .#modules.x10.home-manager | from json
warning: Git tree '/home/x10an14/Documents/sr.ht/nix-parts-conf' is dirty
error:
       … while evaluating the attribute 'root.result'
         at «flakes-internal»/call-flake.nix:98:7:
           97|     {
           98|       result =
             |       ^
           99|         if node.flake or true then

       … in the left operand of the update (//) operator
         at «flakes-internal»/call-flake.nix:85:9:
           84|         # This is shadowed in the next //
           85|         // sourceInfo
             |         ^
           86|         // {

       … while evaluating the option `flake':

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

       error: The option `flake.modules.x10.device-configs' in module `/nix/store/6rgggbp9175wyswk9d2pl66v22vn4c3b-source/device-configs/default.nix' would be a parent of the following options, but its type `attribute set of (submodule)' does not support nested options.
        - option(s) with prefix `flake.modules.x10.device-configs.home-manager' in module `/nix/store/6rgggbp9175wyswk9d2pl66v22vn4c3b-source/device-configs/home-manager.nix'


14:51:34
@n4ch723hr3r:nope.chat@n4ch723hr3r:nope.chatthe snowfall scared me xD14:52:02

Show newer messages


Back to Room ListRoom Version: 10