From 543f46b91b2f2c182007a0d484d461ebaef3a624 Mon Sep 17 00:00:00 2001 From: Ritiek Malhotra Date: Sun, 13 Oct 2024 04:49:47 +0530 Subject: [PATCH] Split README.md for respective machine --- README.md | 107 ++------------------------------- machines/clawsiecats/README.md | 98 ++++++++++++++++++++++++++++++ machines/mishy/README.md | 36 +++++++++++ 3 files changed, 138 insertions(+), 103 deletions(-) create mode 100644 machines/clawsiecats/README.md create mode 100644 machines/mishy/README.md diff --git a/README.md b/README.md index b5dd44a..ef3f56c 100644 --- a/README.md +++ b/README.md @@ -11,114 +11,15 @@ custom shell scripts (in the [legacy](https://github.com/ritiek/dotfiles/tree/le ## Machines -My lovely machine configurations. +- [mishy](/machines/mishy) +- [clawsiecats](/machines/clawsiecats) -### Mishy +-------------------- -```sh -$ sudo mv /etc/nixos{,.bak} -$ sudo git clone https://github.com/ritiek/dotfiles /etc/nixos -``` - -- Update machine specific values in `environment.nix`. -- Setup Intel/AMD/Nvidia graphics in `graphics.nix`. If I want to use Intel graphics, then comment out - `graphics.nix` entirely. If I want to be using Nvidia graphics, then leave `graphics.nix` unmodified. -- Rebuild config: -```sh -# Create a machine specific `hardware-configuration.nix`. -$ sudo nixos-generate-config - -$ cd /etc/nixos/ -$ nix flake update - -$ sudo nixos-rebuild boot --flake '.#mishy' -$ sudo shutdown -r now -``` - -### Clawsiecats -A configuration optimized for limited compute availability, supposed to be deployed on VPS machines. -It hosts routing services, tailscale, some other useful stuff. - -Uncomment the disko partioning configuration that should be used in [flake.nix](/flake.nix) under the -variant before deployment. Supports MBR, GPT, GPT+LUKS. I haven't gotten MBR+LUKS working yet. - - -#### Vultr (GPT, GPT+LUKS) - -Looks to work fine on the most minimal [Vultr](https://www.vultr.com/) configuration. - -| CPU | Memory | Disk Space | -|-------|----------|------------| -| 1 vCPU | 0.5 GB | 10 GB SSD | - -**Deployment Steps** - -1. Replace your SSH public keys in [minimal.nix](/generators/minimal.nix). - -2. Build the minimal ISO: - ```bash - $ nix build '.#minimal-iso' - $ ls ./result/iso/nixos.iso - ``` - -3. Deploy a new machine on Vultr (any OS). - -4. Update the machine settings on Vultr to boot from the generated ISO. - Vultr takes in the ISO URL, so I'll need to host this ISO somewhere first. - -5. Replace the SSH public keys in asdfasdf (todo: i need to add n reuse ssh keys from flake.nix maybe). - -6. Deploy the configuration using nixos-anywhere: - ```bash - # For GPT+LUKS - $ ./machines/clawsiecats/anywhere.sh '.#clawsiecats-luks' root@vps.machine.ip.address --luks - - # For GPT - $ ./machines/clawsiecats/anywhere.sh '.#clawsiecats' root@vps.machine.ip.address - ``` -The installation succeeds hopefully. - -7. Remove the ISO from Vultr machine settings and let the machine reboot. - -8. (GPT+LUKS only) Decrypt the drive in dropbear: - ``` - $ ssh vps.machine.ip.address -p 2222 - ``` - -9. Log in to the freshy installed NixOS: - ``` - $ ssh vps.machine.ip.address - ``` - -#### HostVDS (MBR) -```bash -$ ./machines/clawsiecats/anywhere.sh '.#clawsiecats' root@vps.machine.ip.address -``` - -#### Minimal configuration (for testing purpose): -```bash -$ ./machines/clawsiecats/anywhere.sh '.#clawsiecats-minimal' root@vps.machine.ip.address -``` - -### Debian/Arch based distros +## [Legacy] Debian/Arch based distros Install [chezmoi](https://www.chezmoi.io/install/) and run: ```sh $ chezmoi init ritiek $ chezmoi apply -R ``` - -## Screenshots - -March, 2020 - - - -November, 2022 - - - -July, 2024 - - - diff --git a/machines/clawsiecats/README.md b/machines/clawsiecats/README.md new file mode 100644 index 0000000..c5633eb --- /dev/null +++ b/machines/clawsiecats/README.md @@ -0,0 +1,98 @@ +# Clawsiecats + +A configuration optimized for limited compute availability, supposed to be deployed on VPS machines. +It hosts routing services, tailscale, some other useful stuff. It has impermanence enabled. + +Uncomment the disko partioning configuration that should be used in [flake.nix](/flake.nix) under the +variant before deployment. Supports MBR, GPT, GPT+LUKS. I haven't gotten MBR+LUKS working yet. + + +## Vultr (GPT, GPT+LUKS) + +The configuration looks to work fine on the most minimal [Vultr](https://www.vultr.com/) configuration. + +| CPU | Memory | Disk Space | +|-------|----------|------------| +| 1 vCPU | 0.5 GB | 10 GB SSD | + +**Deployment Steps** + +1. Replace your SSH public keys in [/generators/minimal.nix](/generators/minimal.nix). + +2. Build the minimal ISO: + ```bash + $ nix build '.#minimal-iso' + $ ls ./result/iso/nixos.iso + ``` + +3. Deploy a new machine on Vultr (any OS). + +4. Update the machine settings on Vultr to boot from the generated ISO. + Vultr takes in the ISO URL, so I'll need to host this ISO somewhere first. + +5. Replace the SSH public keys in [/machines/clawsiecats/minimal.nix](/machines/clawsiecats/minimal.nix). + +6. Deploy the configuration using nixos-anywhere: + ```bash + # For GPT+LUKS + $ ./machines/clawsiecats/anywhere.sh '.#clawsiecats-luks' root@vps.machine.ip.address --luks + + # For GPT + $ ./machines/clawsiecats/anywhere.sh '.#clawsiecats' root@vps.machine.ip.address + ``` + The installation succeeds hopefully. + +7. Remove the ISO from Vultr machine settings and let the machine reboot. + +8. (GPT+LUKS only) Decrypt the drive in dropbear: + ``` + $ ssh vps.machine.ip.address -p 2222 + ``` + +9. Log in to the freshy installed NixOS: + ``` + $ ssh vps.machine.ip.address + ``` + + +## HostVDS (MBR) + +The configuration goes tortoise after a while on the most minimal [HostVDS](https://hostvds.com/) configuration. + +| CPU | Memory | Disk Space | +|-------|----------|------------| +| 1 vCPU | 1.0 GB | 10 GB SSD | + +This, however, seems like HostVDS issue to me more than configuration overloading the machine. + +The very next tier machine looks to work fine. + +| CPU | Memory | Disk Space | +|-------|----------|------------| +| 1 vCPU | 2.0 GB | 20 GB SSD | + +**Deployment Steps** + +1. Replace your SSH public keys in [/generators/minimal.nix](/generators/minimal.nix). + +2. Create a new instance on HostVDS and choose Debian 12 as the OS. + +3. Deploy the configuration using nixos-anywhere: + ```bash + $ ./machines/clawsiecats/anywhere.sh '.#clawsiecats' root@vps.machine.ip.address + ``` + The installation succeeds hopefully. + +4. Let the machine reboot. + +5. Log in to the freshy installed NixOS: + ``` + $ ssh vps.machine.ip.address + ``` + + +## Minimal configuration (for testing purpose): + +```bash +$ ./machines/clawsiecats/anywhere.sh '.#clawsiecats-minimal' root@vps.machine.ip.address +``` diff --git a/machines/mishy/README.md b/machines/mishy/README.md new file mode 100644 index 0000000..fafd392 --- /dev/null +++ b/machines/mishy/README.md @@ -0,0 +1,36 @@ +# Mishy + +```sh +$ sudo mv /etc/nixos{,.bak} +$ sudo git clone https://github.com/ritiek/dotfiles /etc/nixos +``` + +- Update machine specific values in `environment.nix`. +- Setup Intel/AMD/Nvidia graphics in `graphics.nix`. If I want to use Intel graphics, then comment out + `graphics.nix` entirely. If I want to be using Nvidia graphics, then leave `graphics.nix` unmodified. +- Rebuild config: +```sh +# Create a machine specific `hardware-configuration.nix`. +$ sudo nixos-generate-config + +$ cd /etc/nixos/ +$ nix flake update + +$ sudo nixos-rebuild boot --flake '.#mishy' +$ sudo shutdown -r now +``` + +## Screenshots + +March, 2020 + + + +November, 2022 + + + +July, 2024 + + +