You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This resulting expression could be used by nixos-rebuild to construct a system configuration.
How would one go about bootstrapping a system (say a laptop) and using NiJS code as much as possible?
I'm new to NixOS in general, but it seems like it would be these steps basically (please correct them if needed):
make partitions and needed filesystems on the target disk of the laptop
Run curl https://nixos.org/nix/install | sh to get the nix tool
Run sudo which nixos-generate-config --root /mnt to add NixOS basic config onto the target disk
Now this part, I'm not completely sure about:
Update /mnt/etc/nixos/configuration.nix so that it will install Node.js and npm.
Place the .js file on the system. (f.e. /mnt/etc/nixos/configuration.js).
sudo PATH="$PATH" NIX_PATH="$NIX_PATH" which nixos-install --root /mnt
Once booted into the new system, run the .js file with Node, which will use NiJS to create an expression of further packages and configs, and which will finally call nix-rebuild with the expression. Or have it use nix-env to augment anything that is already in configuration.nix? Or maybe the configuration.nix can itself specify how to run the .js file so that it all happens in one go? Or, maybe the system from which I'm running nixos-install would run the JS?
The text was updated successfully, but these errors were encountered:
Over at #1 (comment), you wrote
How would one go about bootstrapping a system (say a laptop) and using NiJS code as much as possible?
I'm new to NixOS in general, but it seems like it would be these steps basically (please correct them if needed):
curl https://nixos.org/nix/install | sh
to get the nix toolsudo
which nixos-generate-config--root /mnt
to add NixOS basic config onto the target diskNow this part, I'm not completely sure about:
/mnt/etc/nixos/configuration.nix
so that it will install Node.js and npm..js
file on the system. (f.e./mnt/etc/nixos/configuration.js
).sudo PATH="$PATH" NIX_PATH="$NIX_PATH"
which nixos-install--root /mnt
.js
file with Node, which will use NiJS to create an expression of further packages and configs, and which will finally callnix-rebuild
with the expression. Or have it usenix-env
to augment anything that is already inconfiguration.nix
? Or maybe theconfiguration.nix
can itself specify how to run the.js
file so that it all happens in one go? Or, maybe the system from which I'm running nixos-install would run the JS?The text was updated successfully, but these errors were encountered: