Difference between revisions of "NixOS"

From CAC Documentation wiki
Jump to navigation Jump to search
(Initiating NixOS Page)
 
m
Line 24: Line 24:
 
   1. Shut off instance
 
   1. Shut off instance
 
   2. Create snapshot
 
   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)?

Revision as of 17:15, 19 November 2018

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)?