This clones the repo into directory nixfiles to /etc/nixos; then calls nixos-rebuild to switch into the configuration.
git clone git@github.com:CSESS/Atlas.git /etc/nixos
nixos-rebuild switch --update-input nixpkgs --commit-lock-fileThis will build a VHD from the current atlas configuration.
nix build github:CSESS/Atlas#nixosConfigurations.atlas.config.system.build.azureImage- Create a storage account, create a container in the storage account, upload the VHD as page blob.
- Create an Azure compute gallery.
- Create a VM image version. Choose VHD, not managed image. Choose specialized.
- Create the virtual machine, select the image form "Shared Images". Relax the inbound/outbound rules in Networking.
Auto-commit lockfile during auto updates.
# in /etc/nixos
git config user.email "$(id -un)@$(hostname)"
git config user.name "$(id -un)"This fetches origin/nixos-atlas, then fast-forward/rebase/reset local nixos-atlas according to origin.
git fetch origin nixos-atlas
git merge --ff-only FETCH_HEAD
git rebase FETCH_HEAD
git reset --hard FETCH_HEAD