| 15 Oct 2021 |
@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 |
@kraftnix:matrix.org | although given how infrequently I add new inputs (and then look at the lockfile to optimise the dependency closure), it's not too much of a bit deal for me | 18:01:13 |
@kraftnix:matrix.org | having an auto-follow the nixpkgs would definitely be useful though for adding inputs | 18:01:30 |
@timdeh:matrix.org | yeah it's not really a problem until you are working on an organization full of flakes and trying to remove duplicates on every one 😅 | 18:01:44 |
@kraftnix:matrix.org | in something a bit more offtopic, has anyone else had a look/play with https://github.com/astro/microvm.nix? | 18:03:29 |
@kraftnix:matrix.org | i've integrated it (somewhat) into my devos config (although a nice integration requires some changes upstream) and it's pretty neat. i'm trialing it as a replacement for nixos-containers | 18:08:06 |
@timdeh:matrix.org | That's a fairly interesting usecase. Did you make a module that acts similar to nixos-containers or something? | 18:08:54 |
@kraftnix:matrix.org | i've actually been using Ma27's networkd-containers rewrite of nixos-containers since May (which has an rfc 108) which already has a nicer interface for nixos-containers, and then I have my own wrapper on top to add more functionality such as expanded networking, secrets integration (ala agenix), dataset/storage provisioning (btrfs/zfs)), so I'm just integrating microvm as a hypervisor/provider for it atm | 18:13:25 |
@kraftnix:matrix.org | * i've actually been using Ma27's networkd-containers rewrite of nixos-containers since May (which has an rfc 108) which already has a nicer interface for nixos-containers, and then I have my own wrapper on top to add more functionality such as expanded networking, secrets integration (ala agenix), dataset/storage provisioning (btrfs/zfs), some simple SNI routing), so I'm just integrating microvm as a hypervisor/provider for it atm | 18:14:15 |
@kraftnix:matrix.org | btw i do recommend checking out https://github.com/NixOS/nixpkgs/pull/140669 to see the new nixos-container api, it is significantly better than before and I've been using it with 10+ nixos containers on my server since May without issues (it's much more stable + less prone to weird networking issues than the previous nixos-containers) | 18:22:25 |
@timdeh:matrix.org | nice | 18:22:43 |
@timdeh:matrix.org | I wonder if this would help you David Arnold (blaggacao) on: https://github.com/input-output-hk/nomad-driver-nspawn-nixos-container | 18:23:10 |
@kraftnix:matrix.org | Redacted or Malformed Event | 20:09:49 |