!avYyleMexqjFHoqrME:nixos.org

Nix Documentation

421 Members
Discussion about documentation improvements around the Nix ecosystem87 Servers

Load older messages


SenderMessageTime
16 Nov 2023
@i97henka:matrix.orghenrik-chI won't be able to join the doc meeting today. Have a good session!14:24:26
@infinisil:matrix.orginfinisil I'd like to highlight ryantm's PR to add a new split Nixpkgs manual render: https://github.com/NixOS/nixpkgs/pull/108063 🚀 18:32:28
@infinisil:matrix.orginfinisilIt was about to be merged recently, but got some comments. It would be great if we could help out getting it merged18:32:52
@ryantm:matrix.orgryantmYeah, haven't had a chance to address those comments. The inotify stuff is something I'm not particularly familiar with.18:56:41
@olafklingt:matrix.org@olafklingt:matrix.org

i am trying to react to fricklerhandwerk comment in a pr.

but i am stuck.

I am wondering how one could pass a configuration option to

$ nix-shell -p nixos-install-tools -I nixpkgs=channel:nixos-21.05

so that xserverEnabled is true independent from the host configuration. so that it is passed to the script here

21:51:01
@olafklingt:matrix.org@olafklingt:matrix.org *

i am trying to react to fricklerhandwerk comment in a pr.

but i am stuck.

I am wondering how one could pass a configuration option to

$ nix-shell -p nixos-install-tools -I nixpkgs=channel:nixos-21.05

so that xserverEnabled is true independent from the host configuration. so that it is passed to the script here or rather here to be more precise.

21:59:16
@artturin:matrix.orgArtturin
In reply to @olafklingt:matrix.org

i am trying to react to fricklerhandwerk comment in a pr.

but i am stuck.

I am wondering how one could pass a configuration option to

$ nix-shell -p nixos-install-tools -I nixpkgs=channel:nixos-21.05

so that xserverEnabled is true independent from the host configuration. so that it is passed to the script here or rather here to be more precise.

nix-shell --expr "with (import <nixpkgs> {}); (nixos { services.xserver.enable = true; }).config.system.build.nixos-install" -I nixpkgs=channel:nixos-unstable

however that only contains nixos-install

pkgs.nixos-install-tools aggregates all the install tools https://github.com/NixOS/nixpkgs/blob/master/pkgs/tools/nix/nixos-install-tools/default.nix

Instead of re-implement what the package is doing it would be better to add a argument to the package which will then be passed to the nixos call here https://github.com/NixOS/nixpkgs/blob/d6400c8a2a27e8ba20971d72c76793b7c684f9ec/pkgs/tools/nix/nixos-install-tools/default.nix#L13

22:06:20
@olafklingt:matrix.org@olafklingt:matrix.org
In reply to @artturin:matrix.org

nix-shell --expr "with (import <nixpkgs> {}); (nixos { services.xserver.enable = true; }).config.system.build.nixos-install" -I nixpkgs=channel:nixos-unstable

however that only contains nixos-install

pkgs.nixos-install-tools aggregates all the install tools https://github.com/NixOS/nixpkgs/blob/master/pkgs/tools/nix/nixos-install-tools/default.nix

Instead of re-implement what the package is doing it would be better to add a argument to the package which will then be passed to the nixos call here https://github.com/NixOS/nixpkgs/blob/d6400c8a2a27e8ba20971d72c76793b7c684f9ec/pkgs/tools/nix/nixos-install-tools/default.nix#L13

thank you Artturin
22:08:58
@artturin:matrix.orgArtturin

It's possible to override the nixos argument of the package with a function and then discarding the {} part of nixos {}

$ nix-shell --expr "with (import <nixpkgs> {}); nixos-install-tools.override (old: { nixos = _: old.nixos { services.xserver.enable = true; }; })" -I nixpkgs=channel:nixos-unstable

22:10:00
@artturin:matrix.orgArtturin *

It's possible to override the nixos argument of the package with a function and then discarding(not using) the {} part of nixos {}

$ nix-shell --expr "with (import <nixpkgs> {}); nixos-install-tools.override (old: { nixos = _: old.nixos { services.xserver.enable = true; }; })" -I nixpkgs=channel:nixos-unstable

22:10:42
@artturin:matrix.orgArtturinSo a adding a new argument isn't needed if you're okay with that trick22:12:28
@olafklingt:matrix.org@olafklingt:matrix.org what is the _: syntax? in nixos = _: old 22:16:36
@alex:tunstall.xyzAlex
In reply to @olafklingt:matrix.org
what is the _: syntax? in nixos = _: old
_: old is a function that ignores its argument and returns old
22:17:10
@artturin:matrix.orgArtturin
In reply to @olafklingt:matrix.org
what is the _: syntax? in nixos = _: old
(the _ can be anything)
22:17:30
@olafklingt:matrix.org@olafklingt:matrix.orgto avoid the need to merge options?22:17:53
@artturin:matrix.orgArtturin

No

nix-repl> nixos1 = _: nixos { services.xserver.enable = true; }

nix-repl> nixos2 = nixos { services.xserver.enable = true; }

nix-repl> nixos1 {}
<...works>

nix-repl> nixos2 {}
error: attempt to call something which is not a function but a set

       at «string»:1:1:

            1| nixos2 {}
             | ^

22:19:58
@artturin:matrix.orgArtturin in https://github.com/NixOS/nixpkgs/blob/d6400c8a2a27e8ba20971d72c76793b7c684f9ec/pkgs/tools/nix/nixos-install-tools/default.nix#L13
the package will call the argument nixos with {} which would fail if the argument wasn't a function
22:20:55
@artturin:matrix.orgArtturin by adding _: we pretend it's still the original nixos argument which would not error when called with a argument({}) 22:21:57
@artturin:matrix.orgArtturin * by adding _: we pretend it's still the original nixos argument which would not error when called with a argument({}) 22:22:04
@artturin:matrix.orgArtturinthe _ is just a convention for the naming of arguments which will not be used22:22:45
@artturin:matrix.orgArtturinhttps://nixos.org/manual/nix/stable/language/constructs.html#functions if you need more info on functions22:23:31
@olafklingt:matrix.org@olafklingt:matrix.orgthank you but we should move this elsewhere22:25:14
@artturin:matrix.orgArtturin
In reply to @ryantm:matrix.org
Yeah, haven't had a chance to address those comments. The inotify stuff is something I'm not particularly familiar with.
Posted a inotify suggestion
https://github.com/NixOS/nixpkgs/pull/108063#discussion_r1396461303
22:50:17
17 Nov 2023
@asymmetric:matrix.dapp.org.ukasymmetric
In reply to @infinisil:matrix.org
asymmetric: Ping regarding the transfer of nixdoc
done, sorry for the delay. i've added you as one of the admins, i can demote myself in a few days
15:09:05
@asymmetric:matrix.dapp.org.ukasymmetrichas anyone had a chance to look at this? https://github.com/NixOS/nix.dev/pull/79716:23:05
@infinisil:matrix.orginfinisil asymmetric: No worries, thanks! 16:46:22
@fricklerhandwerk:matrix.orgfricklerhandwerk
In reply to @asymmetric:matrix.dapp.org.uk
has anyone had a chance to look at this? https://github.com/NixOS/nix.dev/pull/797
Ah yes thanks for the ping. I had an unsent review…
17:47:28
18 Nov 2023
@danielsidhion:nixos.devdanielsidhion joined the room.04:05:50
@danielsidhion:nixos.devdanielsidhion changed their display name from Daniel Sidhion to danielsidhion.04:08:31
@danielsidhion:nixos.devdanielsidhionHey folks, I've been meaning to join one of the documentation meetings and finally had time to join last thursday, but couldn't because I wasn't let in the room. Not sure if I got the time wrong or something else. Meetings happen at 15:00 UTC, is that correct? If so, anything else I should do/ask to be able to join another meeting in the future?04:25:45

Show newer messages


Back to Room ListRoom Version: 6