| 20 Jul 2025 |
@n4ch723hr3r:nope.chat | im not sure about if this is even possible since youd have to overwrite or wrap the binOp functor in .type.functor | 14:23:57 |
@n4ch723hr3r:nope.chat | you can also explore via nix repl ;) | 14:24:13 |
@n4ch723hr3r:nope.chat | apparently you can 🤔 | 14:27:06 |
@n4ch723hr3r:nope.chat | users.users = lib.mkOption {
type = with lib.types; attrsOf (submodule userOptions);
};
found this in the openssh module
| 14:27:27 |
@n4ch723hr3r:nope.chat | thats why if you search for "users.users" on search.nixos.org there are sometimes openssh and sometimes users-groups.nix given as a source | 14:28:46 |
@n4ch723hr3r:nope.chat | x10an14 so maybe try extending it like openssh does for users.users and see what happens xD | 14:29:58 |
@n4ch723hr3r:nope.chat | https://github.com/NixOS/nixpkgs/blob/nixos-unstable/nixos/modules/services/networking/ssh/sshd.nix#L666 | 14:30:20 |
x10an14 | n4ch723hr3r: I think this is the closest I could easily find in that huge file that might answer my question (how to access option values declared elsewhere in another file/option): https://github.com/NixOS/nixpkgs/blob/nixos-unstable/nixos/modules/services/networking/ssh/sshd.nix#L149 | 14:46:03 |
@n4ch723hr3r:nope.chat | accessing the values can be done over config but i thought you want to extend a module with a new option | 14:48:01 |
x10an14 | Ahhh, no, because they don't use those values inside the submodule, I saw wrong | 14:48:22 |