NixOS

From CAC Documentation wiki
Revision as of 16:16, 19 November 2018 by Beb82 (talk | contribs)
Jump to navigation Jump to search

Update Image

  • From a newly created NixOS instance:
 sudo nix-channel --update
  • Inspect/edit /etc/nixos/configuration.nix
 sudo nixos-rebuild switch
 sudo reboot # and then confirm working
 nix-collect-garbage -d && sudo nix-collect-garbage -d 
 sudo reboot # and then confirm working
  • Change nixos password (passwd) and confirm nothing funny in /etc/shadow!!!
  • Update nixos user password in Shared-CornellCAC last pass vault
  • Confirm you can't ssh or login as root without a password
  • Further cleanup:
 sudo rm -fr /var/lib/cloud/
 rm /home/nixos/.bash_history
  • From OpenStack:
 1. Shut off instance
 2. Create snapshot
  • Work in progress

---

 3. Rename old Image (snapshot) to NixOS-Old
 4. Name new image (snapshot) NixOS; Edit imate: Make sure Protected/Sharing is set to Yes. update metadata as necessary (may need to delete base_image_ref as it is empty). 
 5. Test that new image works by creating and testing an instance.
 6. Verify image is seen between projects (how)?
 (While there are NixOS release, it seems less important to version an image based on them, thus we just name the image NixOS).