!wfudwzqQUiJYJnqfSY:nixos.org

NixOS Module System

161 Members
32 Servers

Load older messages


SenderMessageTime
27 Feb 2026
@hexa:lossy.networkhexa
    servers = mkOption {
      default = { };
      description = ''
        Attribute set of wyoming-faster-whisper instances to spawn.
      '';
      type = attrsOf (submodule {
        options = {
          enable = mkEnableOption "Wyoming faster-whisper server";

          zeroconf = {
            enable = mkEnableOption "zeroconf discovery" // {
              default = true;
            };

            name = mkOption {
              type = str;
              default = "faster-whisper-foo"; # how to replace foo with the attribute name?
              description = ''
                The advertised name for zeroconf discovery.
              '';
            };
          };
22:41:09
@hexa:lossy.networkhexahow to reference the attribute name in inside the attrvalues? do we have a facility for that? 🤔22:41:56
@hexa:lossy.networkhexa* how to reference the attribute name inside the attrvalue? do we have a facility for that? 🤔22:42:06
@hsjobeki:matrix.orghsjobekiSubmodule can be a function. If you destructure 'name' the module system will provide it.22:53:18
@hsjobeki:matrix.orghsjobekiIf I am understanding the question correct 22:53:36
@hsjobeki:matrix.orghsjobekisubmodule ({ name, ... }: ... }22:54:00
@hsjobeki:matrix.orghsjobekiOr did you mean another attributeName?22:55:00
@hsjobeki:matrix.orghsjobeki* submodule ({ name, ... }: ... your options })22:57:09
@hsjobeki:matrix.orghsjobekiin fact name is always available in submodules, but it needs to be explicitly destructured in functionargs of a module. If not destructured it's not passed. So a module like moduleArgs: { .... } won't have it22:59:46
@hexa:lossy.networkhexanah, the servers.${name} = { // name in here23:10:04
@hexa:lossy.networkhexaok, thx!23:10:14
1 Mar 2026
@trainwreckscritchesvisual_novel12195:matrix.orgRobin V. joined the room.01:16:46

There are no newer messages yet.


Back to Room ListRoom Version: 10