15 Oct 2021 |
@timdeh:matrix.org | Nix does have it's own ini like format for the nix.conf already, so I guess we could use that | 16:03:13 |
ultranix | i didnt understand the desire to move away from a nix-based flake config file, what's wrong with nix | 16:32:29 |
@timdeh:matrix.org | I dunno, I guess people are always looking for a reason to not use Nix, of which unfortunately there are plenty... | 16:38:27 |
@timdeh:matrix.org | It's difficult to install on some systems (darwin), Nix the language has strange syntax and may be unfamiliar especially to users who have never worked in a purely functional language, nix evals can take an infinite amount of time, etc | 16:39:21 |
@timdeh:matrix.org | working professionally with a bunch of Mac OSX users who range from semi to very hostile to Nix, I've become more aware of these issues lately | 16:41:56 |
@timdeh:matrix.org | Lately I've wondering if Nix is actually misclassifying itself as a package manager at all. Perhaps it could more accurately be described as a package compiler. Such a tool is fine for developers who are particular interested in building complex tooling with it, but kinda unsuitable for just quickly installing some packages. | 16:46:00 |
@timdeh:matrix.org | It might be nice to have a more minimal frontend that works more like a traditional package manager, i.e. it doesn't evaluate anything it just has knowledge of where binaries exist in various caches and knows how to pull them | 16:46:42 |
@timdeh:matrix.org | but these are just random thoughts floating around in my head, maybe someday I will come up with something more concrete 😅 | 16:49:01 |
David Arnold (blaggacao) | The appeal of a toml file is familiarity and blocking off too much logic (vs. data) from the entrypoint. | 17:47:30 |
David Arnold (blaggacao) | I regard nix-lang as a config mgt language with special support for the file system API but no support for remote APIs. | 17:48:29 |
@timdeh:matrix.org | I think an inputs.nix would actually be really convenient if it were just a list of refs:
[
"github:owner/repo1"
"github:owner/repo2"
github:owner/repo3/someRev"
]
| 17:49:35 |
@timdeh:matrix.org | * I think an inputs.nix would actually be really convenient if it were just a list of refs:
[
"github:owner/repo1"
"github:owner/repo2"
"github:owner/repo3/someRev"
]
| 17:49:47 |
@timdeh:matrix.org | toml would be fairly similar but a bit more annoying with all the commas | 17:50:11 |
@kraftnix:matrix.org | how would you manage naming conflicts if inputs.nix were a list (having multiple versions of nixpkgs)? | 17:51:25 |
@timdeh:matrix.org | well the way I'd imagine it, you could still have the explicit inputs section in the flake.nix for situations like that | 17:52:12 |
@timdeh:matrix.org | or maybe even just a ?name= | 17:52:33 |
@kraftnix:matrix.org | also follows I guess as well, tbh I like having all my input definitions in one place with all the follows defined, it makes it very easy for my to see/manage my immediate dependencies, i would hate the UX of splitting it up (however I guess this would be optional + optimal for the simple flake usecases) | 17:53:56 |
@timdeh:matrix.org | or maybe the list could just accept an attrs | 17:53:57 |
@timdeh:matrix.org | I hate having to define follows explicitly though. It's tedious and error prone | 17:54:22 |
@timdeh:matrix.org | I have a draft issue open for ideas on how we might be able to help with that | 17:54:43 |
@timdeh:matrix.org | well it's not open yet | 17:54:48 |
@timdeh:matrix.org | just a file on my harddrive 😛 | 17:55:02 |
@kraftnix:matrix.org | but how else would you handle follows without follows (this is a bit circular). having the optionality to reduce my closure size my enforcing a follows, with the option of using upstreams is a nice tool imo, i haven't run into too many issues with it (i think) | 17:56:38 |
@timdeh:matrix.org | anyway, you could probably still do:
[
{ someInput = {}; }
]
if you wanted everything in one place
| 17:57:12 |
@timdeh:matrix.org | so I'd imagine we could just have some commands that help us a bit | 17:57:25 |
@timdeh:matrix.org | say a nix flake follow nixpkgs which searches all inputs for a nixpkgs input, and follows the one at the root if found | 17:57:47 |
@timdeh:matrix.org | it could write to the flake so that it's still declarative | 17:58:01 |
@timdeh:matrix.org | That covers about 99% of the reason I use follows at least 😅 | 17:59:08 |
@timdeh:matrix.org | We could even do this a bit more aggressively and/or automatically by simply following any input nixpkgs if there also exists a nixpkgs at the root | 17:59:46 |
@kraftnix:matrix.org | i think some cli tooling would be nice to auto-setup/configure like that | 18:00:13 |