NixOS Module System | 152 Members | |
| 31 Servers |
| Sender | Message | Time |
|---|---|---|
| 24 Nov 2025 | ||
| Though i am not sure what the benefit of merging without checking is. Checks are usually shallow and shouldnt change the lazyness. If the value is not of the expected type, merging it would also fail | 16:50:33 | |
| If you want merging without checking, you can still construct a type that achieves that | 16:51:02 | |
But yeah, generally the check is simple because otherwise you're inducing unnecessary strictness, as in non-laziness | 16:51:36 | |
| => infinite recursions | 16:51:54 | |
| Do you suspect a breaking change in lazyness between just merge and checkAndMerge ? | 16:54:48 | |
| We dont have any reports, or at least i didnt get pinged in any issues regarding that. | 16:55:47 | |
| do i have to use systemd.tmpfiles? | 16:56:55 | |
In reply to @n4ch723hr3r:nope.chatThis room is for discussing the module system itself, not NixOS and its options. You want https://matrix.to/#/!6oudZq5zJjAyrxL2uY:0upti.me | 17:16:25 | |
| Hi All, What do u all think about the flake-parts? Is that somehow making the current modules system better? Or it helps the current modules to be easy? | 17:59:32 | |
| Flake-parts uses the module system to construct flake outputs. Just like how NixOS uses the module system to construct an OS, or Home Manager uses the module system to construct a user's profile. I'm not sure what you're asking about how it interacts with "current" modules, or what you mean by "current" 🙂 | 18:20:35 | |
| i think hes asking for an opinion about flake.parts | 18:43:44 | |
| 26 Nov 2025 | ||
| I'd say i don't have a general opinion. If you develop a third party nix library that other people depend on every input that you have adds to their dependencies as well. That is how flake dependencies behave. And everyone needs to pin nixpkgs-lib of flake-parts otherwise you get their version, which is an extra 50MB download.Other than that if you are using it for your own project that doesn't have dependents it is in my opinion a good UX, which lets you leverage the module system to decompose the components of your flake. | 16:33:29 | |
it now uses a small lib-only flake fwiw, but the override still makes sense to have | 16:39:27 | |
| 30 Nov 2025 | ||
| 20:47:28 | ||
| 1 Dec 2025 | ||
| 18:39:52 | ||
| 2 Dec 2025 | ||
| 09:35:25 | ||
| 4 Dec 2025 | ||
| 16:41:35 | ||
| 6 Dec 2025 | ||
| 07:44:51 | ||
| 10 Dec 2025 | ||
| 23:23:03 | ||
| 11 Dec 2025 | ||
| 19:54:05 | ||
| 13 Dec 2025 | ||
| 05:59:21 | ||
| 14 Dec 2025 | ||
| 03:42:57 | ||
| 13:29:46 | ||
| 15 Dec 2025 | ||
| 00:16:12 | ||
| 16 Dec 2025 | ||
| 04:30:36 | ||
| 04:30:46 | ||
| 19 Dec 2025 | ||
| 02:37:47 | ||
| im writing a NixOS module for the bore TCP tunnel service. So far I have a working version in my own flake that im using in a few of my servers right now: https://github.com/zSuperx/nix-bore. But I was thinking that this could be nice to have within nixpkgs itself as a builtin module, so I'm going through the contributing guide for modules and editing some of the types and whatnot. These are the questions I have right now: Since the module im writing has options for setting ports, im assuming i should be using type = lib.types.port whenever possible? Likewise, I'm adding a secretFile option so the systemd service reads the secret from a file rather than plaintext. Should I be using type = lib.types.path for this option? I see a few path options in the type definitions file for nixpkgs, so just wanted to double check. When actually evaluating and creating the systemd service file, since the set options values are being processed and interpolated into the serviceConfig.ExecStart bash script, when should I be using lib.escapeShellArg(s)? and last thing (for now) that im unsure about is the use of lib.literalExpression. I see it show up in a few modules I've been reading here and there, but I don't know what the actual use-case is or when it's preferred over a string. sorry if this is a lot of text to send at once. I had originally asked someone via the NixOS discord, and they directed me here. Let me know if I should post this in a different channel or something. | 02:40:31 | |
| * im writing a NixOS module for the bore TCP tunnel service. So far I have a working version in my own flake that im using in a few of my servers right now: https://github.com/zSuperx/nix-bore. But I was thinking that this could be nice to have within nixpkgs itself as a builtin module, so I'm going through the contributing guide for modules and editing some of the types and whatnot. These are the questions I have right now: Since the module im writing has options for setting ports, im assuming i should be using Likewise, I'm adding a When actually evaluating and creating the systemd service file, since the set options values are being processed and interpolated into the and last thing (for now) that im unsure about is the use of sorry if this is a lot of text to send at once. I had originally asked someone via the NixOS discord, and they directed me here. Let me know if I should post this in a different channel or something. | 02:42:43 | |
| * im writing a NixOS module for the bore TCP tunnel service. So far I have a working version in my own flake that im using in a few of my servers right now: https://github.com/zSuperx/nix-bore. But I was thinking that this could be nice to have within nixpkgs itself as a builtin module, so I'm going through the contributing guide for modules and editing some of the types and whatnot. These are the questions I have right now: Since the module im writing has options for setting ports, im assuming i should be using Likewise, I'm adding a When actually evaluating and creating the systemd service file, since the set options values are being processed and interpolated into the and last thing (for now) that im unsure about is the use of sorry if this is a lot of text to send at once. I had originally asked someone via the NixOS discord, and they directed me here. Let me know if I should post this in a different channel or something. And thanks in advance! | 02:43:26 | |