nix develop
nix-shell
Follow the official manual
To check that the configuration is bootable, run:
nix run github:nix-community/nixos-anywhere -- --flake .#hostname --vm-test
Boot the installer and change the root password, then run: Generate the hardware config:
nix run github:nix-community/nixos-anywhere -- --generate-hardware-config nixos-generate-config ./hosts/hostname/hardware-configuration.nix root@ip
Install:
nix run github:nix-community/nixos-anywhere -- --flake .#hostname root@ip
nix build .#nixosConfigurations.rpi3.config.system.build.sdImage
This image can later be flashed with dd.
Install nix:
curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix | sh -s -- install
Add to ~/.config/nix/nix.conf:
experimental-features = nix-command flakes
And then run:
nix run home-manager/master -- init --switch
mkdir ~/projects && cd ~/projects
git clone https://github.com/Toomoch/nixos-config.git && cd nixos-config
home-manager switch --flake .#username
For our hostname:
just rebuild
For a specific hostname:
just rebuild hostname
To deploy:
just deploy hostname