!wfudwzqQUiJYJnqfSY:nixos.org

NixOS Module System

167 Members
35 Servers

Load older messages


SenderMessageTime
23 Feb 2026
@draed:matrix.org@draed:matrix.org left the room.17:53:26
24 Feb 2026
@cdepillabout:matrix.orgcdepillabout left the room.07:41:18
@rend0e_:matrix.orgRen joined the room.10:36:54
@rend0e_:matrix.orgRen changed their display name from rend0e_ to Ren.12:56:48
25 Feb 2026
@gsaurel:laas.frnim65s joined the room.19:54:14
@gsaurel:laas.frnim65s changed their display name from Guilhem to nim65s.19:55:53
@isabel:isabelroses.comisabel changed their profile picture.21:51:53
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:00
@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
2 Mar 2026
@nam3l33ss:matrix.org·☽•Nameless☆•777 · ± changed their profile picture.12:48:46
@nam3l33ss:matrix.org·☽•Nameless☆•777 · ± changed their profile picture.13:05:59
8 Feb 2024
@aciceri:nixos.devzrsk joined the room.10:38:02
15 Feb 2024
@a-kenji:matrix.orga-kenji joined the room.19:15:14
16 Feb 2024
@qyriad:matrix.orgQyriad joined the room.14:56:15
@mr-qubo:matrix.orgmr-qubo joined the room.14:59:24
@mr-qubo:matrix.orgmr-qubo

I recently stumbled upon similar issue when working on home-manager. https://discourse.nixos.org/t/is-it-possible-to-define-systemd-services-in-a-submodule/39538/5

The idea is that enabling https://nix-community.github.io/home-manager/options.xhtml#opt-programs.bash.enableCompletion should set environment.pathsToLink = [ "/share/bash-completion" ];.

I think that module system is missing an option to pass config options recursively up to all ancestors.

15:06:01
@mr-qubo:matrix.orgmr-qubo My idea is that nixos config could have a property extraNixosChildConfig and in home-manager bash module I could set _recurseAncestors = { extraNixosChildConfig = { environment.pathsToLink = [ ... ]; }; }. 15:07:22
@mr-qubo:matrix.orgmr-qubowdyt?15:07:26
@mr-qubo:matrix.orgmr-qubo * My idea is that nixos config could have a property extraNixosChildConfig that gets merged with the rest of the config and in home-manager bash module I could set _recurseAncestors = { extraNixosChildConfig = { environment.pathsToLink = [ ... ]; }; }. 15:07:44

Show newer messages


Back to Room ListRoom Version: 10