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
|