!avYyleMexqjFHoqrME:nixos.org

Nix Documentation

438 Members
Discussion about documentation improvements around the Nix ecosystem93 Servers

Load older messages


SenderMessageTime
17 Aug 2022
@sandro:supersandro.deSandro 🐧https://github.com/NixOS/nix.dev/pull/30711:54:59
@luxus:furiosa.orgluxusone issue with nix i run more then 1 time into it.. there are many tools to tackle a problem. and no central site with infos (or i didn't found it yet) two examples are deploy and secrets. i wish i would have. secrets.md that list all options to handle secrets in best case with comparison 14:56:43
@fricklerhandwerk:matrix.orgfricklerhandwerk

@luxus There is this NixOS Wiki page: Comparison of secret managing schemes

Otherwise you're right, and Domen Kožar said the same in his talk yesterday. Converging on recommendations for best practices is something that nix.dev is meant to do, and the Nix documentation team will support all efforts in that direction.

15:13:53
@luxus:furiosa.orgluxusand its a selling point as well.. if we have a overview of features.. it takes a moment to find out about flakes, home-manager, secrets and the benefits 15:15:26
@luxus:furiosa.orgluxusnot to talk about cool fancy rice stuff like stylix or nix-colors 😄 15:16:05
@luxus:furiosa.orgluxuslinux have distro hopping .. nix itself have solution hopping .. 15:17:10
@luxus:furiosa.orgluxusstarting with a configuration.nix switching to flake.nix switching to a flake that you find on github. switching to another one.. deciding to write your own flake again .. 15:18:03
@luxus:furiosa.orgluxusfinding a flake configuration that have a similar setup makes understanding so much easier. and frameworks like digga are really hard to understand in the first try15:20:07
@luxus:furiosa.orgluxussorry english is not my native tongue 😄 i just talking about my experiences from the last year 15:20:55
@tpw_rules:matrix.orgtpw_rulesimho, and i've expressed this to various people looking for help, flakes have been overcomplicated15:21:26
@luxus:furiosa.orgluxusyes.. and as soon you use a flake config that use some homemade libs, most instructions on websites are not working anymore 15:22:40
@luxus:furiosa.orgluxusits really hard to write a config only with the understanding for programing. its a big plus to understand the nixlang... and i normally can hack my why into most stuff 😄 i can use/create/modify neovim configs in lua without speaking lua. i can fix python stuff without fully understand python.. but with flakes i really feel lost15:25:31
@pedrohlc:mozilla.orgpedrohlc left the room.18:32:41
@greaka:greaka.degreaka joined the room.20:21:33
18 Aug 2022
@paul.tiplady:matrix.orgPaul Tiplady joined the room.03:07:05
@paul.tiplady:matrix.orgPaul TipladyHi folks, Nix noob here, I have a few small thoughts about rough edges on the "new user experience" where some aspects of the docs took me 5-10 mins of digging where I feel they could have been structured to hand-hold a bit better. I've just gone through the Rust Book and so I've got some good contrast for how nice a ramp-up doc can be. Is it useful to share nits and other suggestions here? I feel like most of my input is too small to justify a Github issue.03:10:43
@tpw_rules:matrix.orgtpw_rulesi'd say go ahead03:18:54
@tpw_rules:matrix.orgtpw_rulesi was a new user a few years ago but i've forgotten all those bits03:19:11
@tpw_rules:matrix.orgtpw_rulesbut like the view from up here (if you'll indulge me for a moment) i wonder if the way people approach nix is right03:20:56
@paul.tiplady:matrix.orgPaul Tiplady

👍️ OK here goes. I started off on https://nixos.org/learn.html, clicked "First steps...", and got to https://nixos.org/guides/ad-hoc-developer-environments.html.

My first bit of feedback on the nix CLI tools is that all of the commands have this long delay that makes me wonder if I installed it right; for example nix-env -qaP git just sits there for tens of seconds, before outputting anything. First time I tried nix I assumed it hanged and went and searched for what I might have done wrong. I would suggest having all the commands print something like "fetching from cache" (maybe only if there's a TTY), and if you want to be fancy do something like a progress bar so that interactive users can see what's going on. This seems small but it's a papercut that every new user is going to hit.

As an aside, I'm already thinking "-qaP ?" I think as a mnemonic/teaching aid, using the full nix-env --query --available -P might help to be clear what's going on. Experienced users can of course use the short form, but the long form is more helpful for explaining to noobs what is actually being done without having to crack open the man page.

03:28:36
@paul.tiplady:matrix.orgPaul TipladyNext, the "reproducible executables" example doesn't explicitly say "put this into a file, chmod +x it, and then run the file". I think being more explicit about what you want the user to do with that blob of text would be helpful. This is clearer on https://nix.dev/tutorials/ad-hoc-developer-environments#ad-hoc-envs which I found later and which has better formatting 03:32:32
@paul.tiplady:matrix.orgPaul Tiplady

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
@tpw_rules:matrix.orgtpw_rules Sandro 🐧: nix-env -qaP is definitely a thing to take out in your "sync with best practices" PR 03:36:56
@tpw_rules:matrix.orgtpw_rulesdo you feel familiar with git and github?03:37:52
@paul.tiplady:matrix.orgPaul Tiplady

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 niv add 'python38.withPackages (packages: [ packages.django ])' to continue building on the previous example of installing Django, but that doesn't work. Even niv add python38 doesn't work.

  FATAL: One or more packages failed to update:
  python38.withPackages (packages: [ packages.django ]): Update failed: Key could not be found: url_template
  CallStack (from HasCallStack):
    error, called at src/Niv/Update.hs:80:25 in niv-0.2.21-K4hQ3qL7WtG6yW48qVS1p3:Niv.Update
ERROR: ExitFailure 1

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
@paul.tiplady:matrix.orgPaul Tiplady

Now that I think of it, python38.withPackages isn't explained in terms of the nix-env -qaP command; teach me how to fish and figure out what package names I should use? nix-env just gives me:


nixpkgs.python        python-2.7.18
nixpkgs.python2       python-2.7.18
nixpkgs.python27Full  python-2.7.18
nixpkgs.python2Full   python-2.7.18
nixpkgs.pythonFull    python-2.7.18

-- 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 python38 and explaining the withPackages args, linking it so that I can learn about that source of package information would be useful.

03:42:31
@paul.tiplady:matrix.orgPaul Tiplady

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 default.nix, maybe explain that and shell.nix and why they are awesome (AIUI these are some of the very cool bits of the nix plumbing).

03:45:30
@tpw_rules:matrix.orgtpw_rulescan i ask what brought you to nix?03:45:31
@tpw_rules:matrix.orgtpw_rulesand 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 programmer03:47:43
@tpw_rules:matrix.orgtpw_rules(also that previous q about: do you feel familiar with git and github?)03:48:54

Show newer messages


Back to Room ListRoom Version: 6