| 21 Mar 2025 |
elikoga | There was a little bit of a change wrt registry inputs recently one sec | 11:40:32 |
elikoga | https://github.com/NixOS/nix/pull/12068
Only the global registry is used(?) | 11:41:15 |
@rosssmyth:matrix.org | You can do eta expansion outputs = inputs: import ./function.nix inputs; | 14:11:38 |
@rosssmyth:matrix.org | Which tbh shows how silly the restriction is | 14:14:20 |
joepie91 🏳️🌈 | wait. what? | 16:46:55 |
elikoga | It's a Nix file with a specific format, where normal Nix files are just files that contain a nix value, Nix Flakes also have syntactic restrictions on the inputs&outputs level. | 16:48:24 |
elikoga | * It's a Nix file with a specific format, where normal Nix files are just files that contain a nix value, flake.nix also has syntactic restrictions on the inputs&outputs level. | 16:48:36 |
joepie91 🏳️🌈 | then why does it end in .nix if it is not a freeform Nix file?! | 16:49:15 |
elikoga | ? | 16:49:28 |
joepie91 🏳️🌈 | like, I'm sure those syntactic restrictions have a purpose, but it seems very expectation-breaking for a .nix file to suddenly expect essentially a different format because it happens to be a flake.nix | 16:49:54 |
elikoga | ? | 16:50:09 |
joepie91 🏳️🌈 | I'm not sure what is unclear? | 16:50:25 |
elikoga | What you are proposing as an alternative | 16:51:13 |
elikoga | .i-hate-this-feature just doesn't roll of the toungue that well | 16:51:45 |
joepie91 🏳️🌈 | I am not proposing one; I am complaining that the current choice (of making it look like it's "just a Nix file" was the wrong one. I do not have any specific opinions about what alternative name or extension or whatever should be used, as long as it does not have that problem | 16:52:11 |
elikoga | And since it's a strict subset, I don't see a problem | 16:52:19 |
joepie91 🏳️🌈 | * I am not proposing one; I am complaining that the current choice (of making it look like it's "just a Nix file") was the wrong one. I do not have any specific opinions about what alternative name or extension or whatever should be used, as long as it does not have that problem | 16:52:19 |
joepie91 🏳️🌈 | because this introduces an additional footgun and we already have more than enough of thosed | 16:52:29 |
elikoga | I expect .nix files to contain nix. A condition that is fulfilled with flake.nix files | 16:52:34 |
joepie91 🏳️🌈 | * because this introduces an additional footgun and we already have more than enough of those | 16:52:34 |
elikoga | I don't expect arbitrary files to contain arbitrary values it's not like you have this compaint about NixOS Modules | 16:53:01 |
joepie91 🏳️🌈 | it means that you cannot expect either a) your usual code organization techniques or b) your existing code snippets to work as-is in a flake.nix because there is a subset of valid Nix that is invalid in a flake.nix | 16:53:22 |
elikoga | ? | 16:53:50 |
elikoga | There is an obivous freeform value place where you can write all the nix you want | 16:54:23 |
elikoga | * There is an obvious freeform value place where you can write all the nix you want | 16:54:30 |
joepie91 🏳️🌈 | this is not relevant to my complaint | 16:54:50 |
joepie91 🏳️🌈 | "things should be the thing that they look like" is a pretty elementary principle of designing usable software and this violates that principle | 16:55:16 |
joepie91 🏳️🌈 | it looks like a freeform .nix file but apparently isn't one, in that there are additional syntactic restrictions (ie. beyond the semantic restrictions that might be imposed by some other code that the result of a .nix file may be fed into, and which are within expectations) | 16:56:03 |
joepie91 🏳️🌈 | I'm sure there are a hundred ways to work around this but the point is that you shouldn't need to, it should either a) work the same as everywhere else, or b) if that is not possible, make it obvious that it doesn't in some way | 16:56:45 |
joepie91 🏳️🌈 | (and the canonical way to denote different formats in most computer systems is... to use a different extension or variant of the standard extension) | 16:58:47 |