(from the ground up)
- Download the nixos minimal installer ISO
- Create a VM to boot this installer ISO
Bonus points for setting up SSH
- Set a password on the nixos-install machine
- Setup host ssh config to connect to machine
- Generate a sample NixOS system configuration
nixos-generate-config --dir ./
- Generate a sample flake configuration file
nix --extra-experimental-features "nix-command flakes" flake init
- Do flake magix
I really have no easy explanation other than "do what others do"
- Build an installer image to install your development machine on top of the VM currently booting that installer image
VSCode can be used as an integrated development environment. The development machine needs a package nixos-vscode-server installed that facilitates the VSCode server. Within VSCode there is also an extension Nix IDE for syntax highlighting and formatting.
# SOURCE; https://github.com/nix-community/nixos-vscode-server/blob/1e1358493df6529d4c7bc4cc3066f76fd16d4ae6/README.md
{
inputs.vscode-server.url = "github:nix-community/nixos-vscode-server";
outputs = { self, nixpkgs, vscode-server }: {
nixosConfigurations.yourhostname = nixpkgs.lib.nixosSystem {
modules = [
vscode-server.nixosModules.default
({ config, pkgs, ... }: {
services.vscode-server.enable = true;
})
];
};
};
}
- Add the services.vscode-server configuration to the development machine
- Build the machine and connect from VSCode on your host over SSH to your development machine