(from the ground up)
- Download latest bootstrap image from Github releases: https://github.com/Bert-Proesmans/nix/releases/tag/latest
- Boot bare-metal or virtual machine from the ISO
- Git clone this repository: https://github.com/Bert-Proesmans/nix
- Change directory into the cloned repository
- Open development environment:
nix develop
- Install/deploy the development machine or any other:
invoke deploy development root@localhost
- Download bootstrap image from official distribution: https://nixos.org/download/#nixos-iso
- Boot bare-metal or virtual machine from the ISO
- Setup disks, partitions, and mounts
- 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 out your machine configuration and keep re-applying changes
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