Skip to content
Snippets Groups Projects
Select Git revision
  • dont-use-etc-hosts
  • sec
  • simplify-grafana
  • simple-docs-build
  • local-test-grid
  • develop default protected
  • no-morph-on-nodes
  • stuff
  • arion
9 results

bootstrap-configuration.nix

Blame
  • bootstrap-configuration.nix 5.66 KiB
    #
    # This is a bare-bones configuration that can be edited slightly and then
    # dropped on a 100TB machine that is being crossgraded to NixOS.  It is
    # tailored to the specific hardware choices made for our machines at 100TB and
    # 100TB's network configuration.  The goal is to configure a system *enough*
    # that a better tool (eg morph) can take over.
    #
    #  1. Customize the variables below this comment.
    #
    #  2. Overwrite /etc/nixos/configuration.nix on Debian machine that has had
    #     NixOS installed on top of it.
    #
    #  3. Copy the generated /etc/nixos/hardware-configuration.nix from the Debian
    #     machine and add it to this repository.  We need it to build the system
    #     later.
    #
    #  4. Finish the NixOS install and reboot into a pristine NixOS system.
    #
    #  5. Specify the real configuration for this system and deploy it with morph.
    #
    let
      # Make all these correct.  Some default values from a random system left in
      # place as examples.
    
      # You can probably find this interface using `ip addr` on the target system
      # while it's still running Debian.  Pick the interface that has the public
      # address assigned.
      interface = "eno1";
    
      # You probably just know what the public address is.  Make sure this agrees
      # with what you see in `ip addr` though.
      publicIPv4 = "69.36.183.24";
    
      # You'll find this on the address in the `ip addr` output.  eg:
      #
      #  3: wlp4s0: ...
      #    ...
      #    inet 69.36.183.24/24 ...
      #                      ^^ See?
      #
      prefixLength = 24;
    
      # This is the default gateway address.  You can find it with `ip route` on
      # the target system.
      gateway = "69.36.183.1";
    
      # And the gateway itself is reachable on a particular interface.  Most
      # likely the same as the interface above but I don't know if this is
      # guaranteed.  Look at the `ip route` output to be sure.
      gatewayInterface = "eno1";
    
      # The unique disk identifier where grub should be installed.  This should
      # probably be sda.  You can find this value by looking for the
      # wwn-... symlink to sda in /dev/disk/by-id/.  For example:
      #
      # $ ls -l /dev/disk/by-id/
      # lrwxrwxrwx 1 root root  9 Aug 29 08:09 wwn-0x5002538d414bf195 -> ../../sda
      #
      # Be sure to pick the disk identifier and not the identifier of one of the
      # partitions!
      grubDeviceID = "wwn-0x5000c500936410b9";
    
      # This is whatever ssh public key is appropriate at the time.  I'm leaving
      # mine here for now.
      rootPublicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIN4GenAY/YLGuf1WoMXyyVa3S9i4JLQ0AG+pt7nvcLlQ exarkun@baryon";
    
      # Stop!  I hope you're done when you get here.  If you have to modify
      # anything below this point the expression should probably be refactored and
      # another variable added controlling whatever new thing you need to control.
      # Open an issue: https://whetstone.privatestorage.io/privatestorage/PrivateStorageio/-/issues/new?issue