No description
Find a file
RingOfStorms (Joshua Bell) 9622f1c214 fix url for tmux coal
2025-04-29 14:09:27 -05:00
common fix url for tmux coal 2025-04-29 14:09:27 -05:00
hosts fix h001 2025-04-29 14:08:07 -05:00
todo todo items 2025-03-18 14:17:11 -05:00
.envrc properlly use nix-direnv cache 2025-01-27 10:56:41 -06:00
.gitignore add worktree ease for local dev of my modules system 2025-01-02 01:24:01 -06:00
flake.lock moved open-gist to o001 2025-04-17 00:09:57 -05:00
flake.nix update to not use relative path import 2025-03-18 16:46:30 -05:00
icon.png updates 2024-10-09 18:16:54 -05:00
onboard.nix libre chat 2025-01-04 10:43:06 -06:00
onboard.sh libre chat 2025-01-04 10:43:06 -06:00
readme.md h001 2025-04-29 13:58:36 -05:00

TODO working on changes to this now

Old Config prior to per system flake approach

https://git.joshuabell.xyz/dotfiles/~files/6527f67145fe047df57b4778c154dde580ec04c4

Old modules from multi branch flake approach

First Install on new Machine

NixOS install

  1. Install nix minimal:
  • Partitions

    • parted /dev/DEVICE -- mklabel gpt - make GPT partition table
    • parted /dev/DEVICE -- mkpart NIXROOT ext4 2GB 100% - make root partition (2GB offset for boot)
    • parted /dev/DEVICE -- mkpart ESP fat32 1MB 2GB - make boot partition (2GB)
    • parted /dev/DEVICE -- set 2 esp on - make boot bootable
  • Formatting

    • mkfs.ext4 -L NIXROOT /dev/DEVICE_1 - root ext4
    • mkfs.fat -F 32 -n NIXBOOT /dev/DEVICE_2 - boot FAT
  • Mount

    • mount /dev/disk/by-label/NIXROOT /mnt
    • mkdir -p /mnt/boot
    • mount -o umask=077 /dev/disk/by-label/NIXBOOT /mnt/boot (Note that swap files is defined in nix config later not needed at this stage)
  • nixos config and hardware config

    • export HOSTNAME=desired_hostname_for_this_machine
    • export USERNAME=desired_username_for_admin_on_this_machine (josh)
    • nixos-generate-config --root /mnt
    • cd /mnt/etc/nixos
    • curl -O https://share.joshuabell.link/nix/onboard.sh
    • chmod +x onboard.sh && ./onboard.sh
    • verify hardware config, run nixos-install
    • reboot
  • log into USERNAME with password1, use passwd to change the password

Easiest to ssh into the machine for these steps so you can copy paste...

  • cat /etc/ssh/ssh_host_ed25519_key.pub ~/.ssh/id_ed25519.pub
    • On an already onboarded computer copy these and add them to secrets/secrets.nix file
    • Rekey secrets: nix run github:yaxitech/ragenix -- --rules ~/.config/nixos-config/common/secrets/secrets/secrets.nix -r
    • Maybe copy hardware/configs over and setup, otehrwise do it on the client machine
  • git clone nixos-config git clone https://git.joshuabell.xyz/ringofstorms/dotfiles ~/.config/nixos-config
  • Setup config as needed
    • top level flake.nix additions
    • add hosts dir and files needed
  • sudo nixos-rebuild switch --flake ~/.config/nixos-config/hosts/$HOSTNAME
  • Update remote, ssh should work now: cd ~/.config/nixos-config && git remote remove origin && git remote add origin "ssh://git.joshuabell.xyz:3032/ringofstorms/dotfiles" && git pull origin master

Local tooling

  • bitwarden setup/sign into self hosted vault

  • atuin setup

    • if atuin is on enable that mod in configuration.nix, make sure to atuin login get key from existing device
    • TODO move key into secrets and mount it to atuin local share
  • stormd onboard to network

  • ssh key access, ssh iden in config in nix config

Notes

Dual booting windows?

  • If there is a new boot partition being used than the old windows one, copy over the /boot/EFI/Microsoft folder into the new boot partition, same place
  • If the above auto probing for windows does not work, you can also manually add in a windows.conf in the loader entries: /boot/loader/entries/windows.conf:
title Windows 11
efi   /EFI/Microsoft/Boot/bootmgfw.efi

Settings references

TODO

  • work on secrets pre ragenix, stormd pre install for all the above bootstrapping steps would be ideal
  • reduce home manager, make per user modules support instead
  • Ensure my neovim undohistory/auto saves don't save .age files as they can be sensitive.

Server hosts

simply run deploy in the host root and it will push changes to the server (or deploy_[oracle|linode] <name> from root)