Nix Documentation | 420 Members | |
| Discussion about documentation improvements around the Nix ecosystem | 86 Servers |
| Sender | Message | Time |
|---|---|---|
| 18 Aug 2022 | ||
| The comment "The -I flag pins the Nixpkgs revision to an exact Git revision, leaving no doubt about which exact version of Nix packages will be used." makes my eyes glaze over. How do I get that git revision? Is a user really expected to do this? In practice I don't think I'd use a shell one-liner this way, I'd use a shell.nix, right? I think this example is bringing in immutability a bit too early, even though it's a defining feature. | 03:34:40 | |
Sandro 🐧: nix-env -qaP is definitely a thing to take out in your "sync with best practices" PR | 03:36:56 | |
| do you feel familiar with git and github? | 03:37:52 | |
| The next bit https://nixos.org/guides/towards-reproducibility-pinning-nixpkgs.html#pinning-nixpkgs talks more about this, and feels like the good stuff. But it abandons the python example from before, and so I can't figure out how to use niv. I want to say something like
Not a friendly error message, and I feel like the doc is missing a chance to continue to build on the previous page. | 03:38:28 | |
| Now that I think of it,
-- where is the python38 coming from? (By which I mean, how does a new user figure out what python3* exist to use?) One thing the Rust docs (and ecosystem more generally) do is liberally link between different sources of information, so if there is a doc repository hosting the | 03:42:31 | |
| Final note -- I feel like this brushes over some core concepts: "You can use the generated nix/sources.nix with a top-level default.nix" Before you tell me to do a | 03:45:30 | |
| can i ask what brought you to nix? | 03:45:31 | |
| and do you have any particular goals in using it? if you are trying to get set up with django i imagine you are a python programmer | 03:47:43 | |
| (also that previous q about: do you feel familiar with git and github?) | 03:48:54 | |
| I hear a lot of people preaching on HN about how nice it is, and I see the appeal of setting up developer environments and CI/CD pipelines. I found that on MacOS at least, every 6 months my "new developer" guide for my team broke because of some library/OS change, and I am interested to see if doing things immutably, the Nix way, would be better. Currently my dev env stack is (MacOS): pyenv, pyenv-virtualenv, poetry (would switch if other packaging systems integrated better), PyCharm. I use yarn and webpack for JS stuff. And everything goes into a Docker container and gets deployed to Kubernetes. While I'm mostly writing Python I just followed the example in the docs. I have Docker as my "blessed environment" for builds and CI/CD, but it's annoying to ask developers to use Docker for their local dev loop. So we have two different env setups, one for local dev, and one for CI/CD build and prod deploy. | 03:51:54 | |
| I'm familiar with the git toolchain. | 03:52:28 | |
| and presumably some form of git hosting service? | 03:54:53 | |
| Yes, I've run projects on Github and Gitlab in the past | 03:55:08 | |
| one last random sounding question: do you use apple silicon macs? | 03:56:00 | |
| * one last random sounding question: do you use apple silicon macs? (and is that where you ran your niv command)? | 03:56:09 | |
| Nope, I'm currently on an old (Circa 2014) MBP. | 03:58:13 | |
| okay, thank you very much for coming here to share your experience. i did want to do some further opining on how i use nix, but this isn't really the place. do you want to join the main channel https://matrix.to/#/#nix:nixos.org or PM me? | 04:02:28 | |
| I have to sign off for the eve -- I'll check back in here if I get further with this. And thanks for the offer -- I'll ping you. | 04:06:46 | |
okay, good luck. my first piece of advice is don't use nix-env -qaP for a variety of reasons. use this: https://search.nixos.org/packages | 04:07:48 | |
In reply to @tpw_rules:matrix.orgThen I would need to replace those parts and I am not fast at waiting documentation. | 11:38:59 | |
| 19 Aug 2022 | ||
| that's cool, someone wrote https://nixos.wiki/wiki/Specialisation after my tweag blog post. I added this section because it's a very useful use case but totally impossible to figure out (infinisil found how to do that). Could someone tell me if it's understandable? https://nixos.wiki/wiki/Specialisation#Special_case:_the_default_non-specialised_entry | 20:10:50 | |
In reply to @rapenne-s:tchncs.deIt reads okay to me. Though does it need to be a new file? I would expect including the expression inline into the imports, or just anywhere using mkIf to work fine. | 21:17:09 | |
| Also the config will also apply to specializations containing specializations (not sure if that is a thing). | 21:18:22 | |
| Jan Tojnar yes this can be inline within the imports but I find it very not practical | 21:54:52 | |
| I dunno if it could be possible to cover specialisation in man configuration.nix ? | 22:05:18 | |
In reply to @rapenne-s:tchncs.decool, config.specialisation != {} is a clever hack! I used to use mkRemove to remove items from a list in specialisation. | 22:16:44 | |
In reply to @rapenne-s:tchncs.deI am somewhat worried about perpetuating the misconception that files are something special (I have seen newcomers confused by this) but I am not how to formulate it better without it becoming too clumsy or more confusing | 22:43:07 | |
| I still don't understand why the code can't be put into configuration.nix ^^' so I used a file to keep things clean instead of a big chunk into imports | 22:43:56 | |
| 20 Aug 2022 | ||
| 02:33:32 | ||
| 17:25:18 | ||