Earlier quoted context omitted.
Check out devenv.sh from the Cachix people, it allows you to list stuff like pip for any language, including services / postgresql extensions: { pkgs, ... }: { services.postgres = { enable = true; package = pkgs.postgresql_15; initialDatabases = [{ name = "mydb"; }]; extensions = extensions: [ extensions.postgis extensions.timescaledb ]; settings.shared_preload_libraries = "timescaledb"; initialScript = "CREATE EXTEN…
Interesting, but the word "containers" is scaring me. I wanted just a simple tool to download and install several libraries and not a full Docker/Kubernetes level system... But it looks like a good choice for running tests in CI.
Tvix – A New Implementation of Nix
71–80 of 107 posts
Re: Tvix – A New Implementation of Nix
#72Earlier quoted context omitted.
Nix the language is untyped; I don't believe Tvix changes this, particularly since it has the goal of supporting all of Nixpkgs.
That’s a pity. IMO the lack of static typing is one of the biggest flaws of the language, and it persistently slows me down.
in this case typing is evaluation. so tvix promises doing typing faster.
Re: Tvix – A New Implementation of Nix
#73Earlier quoted context omitted.
Can you provide some links to some projects? You’ve piqued my interest
https://github.com/majbacka-labs/nixos.fi https://news.ycombinator.com/item?id=40010991 https://news.ycombinator.com/item?id=39720007 https://news.ycombinator.com/item?id=39692801 https://news.ycombinator.com/item?id=39658684 https://news.ycombinator.com/item?id=39004785 I didn’t find these via HN search, I found them in my bookmarking account. I have a slightly strange way of bookmarking - I send emails to a dedicat…
does it work for 10k bmarks?
Re: Tvix – A New Implementation of Nix
#74Earlier quoted context omitted.
Check out devenv.sh from the Cachix people, it allows you to list stuff like pip for any language, including services / postgresql extensions: { pkgs, ... }: { services.postgres = { enable = true; package = pkgs.postgresql_15; initialDatabases = [{ name = "mydb"; }]; extensions = extensions: [ extensions.postgis extensions.timescaledb ]; settings.shared_preload_libraries = "timescaledb"; initialScript = "CREATE EXTEN…
Interesting, but the word "containers" is scaring me. I wanted just a simple tool to download and install several libraries and not a full Docker/Kubernetes level system... But it looks like a good choice for running tests in CI.
Re: Tvix – A New Implementation of Nix
#75It's worth noting that tvix explicitly[1] does not support flakes. [1] https://lobste.rs/s/ypwgwp/tvix_we_are_rewriting_nix#c_zvtze...
This seems to be from 2 years ago, a lot of things could have changed. He seemed quite opinionated on flakes, but the only bad thing that I can see to flakes is that you cannot pass args to them, for imo no valid reason, you have to use the file+file protocol and update the inputs each time to have a reasonable way to pass parameters...
asking nix to accept arbitrary args in flakes like asking to so random patch of rust code during compilation. to patch use cargo patch. that is analogy of flakes, when you thing how flakes make nix statically typed.
Re: Tvix – A New Implementation of Nix
#76Maybe worth mentioning rust and performance more prominently as the motivations. Is Nix eating the world? We have seen lots of unbelievable projects using it on HN recently. It feels like anyone serious about complex systems and building software are embracing it. I use it extensively also via nixpkgs, though somehow I have yet to make the leap to full NixOS. One consideration for anyone who hasn’t jumped in, is that…
Can you provide some links to some projects? You’ve piqued my interest
Re: Tvix – A New Implementation of Nix
#77Earlier quoted context omitted.
https://github.com/majbacka-labs/nixos.fi https://news.ycombinator.com/item?id=40010991 https://news.ycombinator.com/item?id=39720007 https://news.ycombinator.com/item?id=39692801 https://news.ycombinator.com/item?id=39658684 https://news.ycombinator.com/item?id=39004785 I didn’t find these via HN search, I found them in my bookmarking account. I have a slightly strange way of bookmarking - I send emails to a dedicat…
do you use special email client and host provider for that? does it work for 10k bmarks?
Re: Tvix – A New Implementation of Nix
#78It's worth noting that tvix explicitly[1] does not support flakes. [1] https://lobste.rs/s/ypwgwp/tvix_we_are_rewriting_nix#c_zvtze...
Tvix explicitly targets stable Nix features, so supporting Flakes is a non-goal. Many users have a poor understanding of what Flakes _actually_ are: They are a bit of UX glue on top of existing Nix features: - Input/output schemas for `flake.nix` - A lock file format - CLI features to work with the two above It's entirely feasible to build out a Flake user interface & evaluation support on top of Tvix without making…
Except that it rolls its own CA store[1], which is also not a stable Nix feature. One could argue that it has to roll its own store because Nix wants to own the store, but implementing a shadow version of an experimental feature makes the "they're just targeting stable features" part ring rather hollow.
> The key point of Tvix _not_ having support for Flakes is to not make special snowflake evaluator features that are tied in with it.
That's not really how I read the authors' defense of this choice. It seems like they made it because they disagree with the design decision, and I consider that more defensible than the position you offer. I just wish they would make this information more central, and I will keep posting it in news items about Tvix because no one else is going to. There is no indication that the "Nix" they implement is many years old now, and when they do[2] indicate it, they are vague about why.
[1] https://cs.tvl.fyi/depot/-/blob/tvix/castore/docs/data-model...
[2] https://cs.tvl.fyi/depot/-/blob/tvix/README.md#compatibility
Re: Tvix – A New Implementation of Nix
#79For somebody who hasn't used Nix yet, but heard good things about it, why use Tvix instead of Nix? The page didn't seem to mention the reason(s) behind the project.
I would recommend against using Tvix at this time, but if you are wondering why they wrote it, they wrote an article: https://tvl.fyi/blog/rewriting-nix The goals they list are: > Creating an alternative implementation of Nix that is fully compatible with nixpkgs. No explanation needed. > More efficient Nix language evaluation, leading to greatly increased performance. The Nix language is evaluated whenever doing the…
A complete non-starter, never in a thousand years am I gonna use something that requires a Docker installation for building derivations.
Re: Tvix – A New Implementation of Nix
#80Do you put the hash at the end of the dirname in the store? IIRC, Nix names things like "$unreadable_hash$pkg_name" which makes tab completion impossible in the case someone wants/needs to go spelunking in that directory.
It's my understanding that the ${hash}-${name} order is actually intended to help with tab completion, but from a different direction; if you already know the first couple chars of the hash, you can quickly tab-complete it, instead of using the less-unique name. I mean, I don't think that's the order I would have picked either, but there is logic behind it.