2018-10-30 13:38:36 +01:00
|
|
|
# steveej's infra
|
2024-11-15 10:17:56 +01:00
|
|
|
|
2018-10-30 13:38:36 +01:00
|
|
|
This repository helps me to manage all computer infrastructure.
|
|
|
|
This is mostly achieved with the help of [Nix](https://nixos.org).
|
|
|
|
|
|
|
|
In the unlikely case that you actually read this and have any questions please don't hesitate to reach out.
|
|
|
|
|
2019-02-09 00:13:04 +01:00
|
|
|
## Initial Roadmap
|
2018-11-03 18:47:47 +01:00
|
|
|
|
2018-10-30 13:38:36 +01:00
|
|
|
- All graphical systems (incl. install media) must have
|
2018-10-31 19:52:39 +01:00
|
|
|
- [x] Full-disk encryption by default
|
2018-10-30 13:38:36 +01:00
|
|
|
- [x] Yubikey support with SSH auth
|
2018-11-10 21:34:04 +01:00
|
|
|
- [x] Migrate all devices to new structure
|
2018-10-30 13:38:36 +01:00
|
|
|
- [x] Encrypted Install media
|
2018-11-03 18:47:47 +01:00
|
|
|
- [x] steveej-laptop
|
2018-11-10 21:34:04 +01:00
|
|
|
- [x] steveej-laptop-work
|
2018-10-31 19:52:39 +01:00
|
|
|
- [ ] Migrate home environment to new structure
|
|
|
|
- [x] home-manager
|
|
|
|
- [x] pkgs-configuration
|
|
|
|
- [ ] development environments
|
2019-02-09 00:13:04 +01:00
|
|
|
- [x] (Semi-) automatic synchronization of important repositories
|
2018-11-10 21:34:04 +01:00
|
|
|
- [x] Modification strategy
|
2024-11-15 10:17:56 +01:00
|
|
|
The approach is to use vcsh for the dotfiles
|
2018-11-10 21:34:04 +01:00
|
|
|
- [x] dotfiles
|
|
|
|
- [x] Toplevel Justfile for simple actions
|
2018-10-30 13:38:36 +01:00
|
|
|
- [x] mount/umount disks
|
|
|
|
- [x] install to mounted disk
|
|
|
|
- [x] rebuild running system
|
2018-11-03 18:47:47 +01:00
|
|
|
- [x] update running system
|
|
|
|
- [x] annotate recipes with some documentation
|
2018-10-31 22:49:43 +01:00
|
|
|
- [x] declare shell.nix with runtime deps
|
2018-11-10 21:34:04 +01:00
|
|
|
- [x] partition/encrypt/format disks
|
2023-04-15 12:21:22 +02:00
|
|
|
- [x] Maybe make this a nix-overlay
|
|
|
|
- [x] refactor as a nix flake and adopt an existing framework
|
|
|
|
- [x] devShell version
|
|
|
|
- [x] ~~version templating~~ obsolete due to the usage of flakes
|
|
|
|
- [x] elias-e525
|
|
|
|
- [x] steveej-t14
|
|
|
|
- [x] contabo vps
|
|
|
|
- [x] sj-pve0
|
2023-11-23 16:03:07 +01:00
|
|
|
- [x] use an existing secret management framework
|
|
|
|
- [x] adapt (or abandon?) _just_ recipes
|
2023-04-15 12:21:22 +02:00
|
|
|
|
2024-11-15 10:17:56 +01:00
|
|
|
- [x] `rebuild-this-device`
|
|
|
|
- [x] `update-this-device`
|
|
|
|
- [x] `rebuild-remote-device`
|
|
|
|
- [x] `update-remote-device`
|
|
|
|
|
|
|
|
evaluate, and understand a path to using these tools in a pull-based fashion:
|
|
|
|
|
2023-04-15 12:21:22 +02:00
|
|
|
- [x] [colmena](https://github.com/zhaofengli/colmena)
|
2024-11-15 10:17:56 +01:00
|
|
|
- bootstrapping: https://github.com/zhaofengli/colmena/issues/68
|
2023-04-15 12:21:22 +02:00
|
|
|
- [ ] deploy-rs
|
2024-11-15 10:17:56 +01:00
|
|
|
|
2023-11-23 16:03:07 +01:00
|
|
|
- [x] 🚧 find a better alternative for the qtile-desktop
|
2024-11-15 10:17:56 +01:00
|
|
|
current issues:
|
|
|
|
|
|
|
|
- floating windows often get lost in the background
|
|
|
|
- plugging in-/out- screen crashes the desktop
|
|
|
|
|
|
|
|
evaluate:
|
|
|
|
|
|
|
|
- [x] ~~🚧 gnome3 + pop-shell~~
|
|
|
|
- [x] ~~leftwm + eww (+ wayland?)~~
|
2023-04-15 12:21:22 +02:00
|
|
|
|
|
|
|
- [ ] (Re-)document bootstrap process
|
2022-11-03 16:48:06 +01:00
|
|
|
- [ ] `apt install sudo cryptsetup` as a requirements on a deb admin machine
|
2018-11-04 01:39:37 +01:00
|
|
|
- [ ] a new machine
|
|
|
|
- [ ] an install media
|
|
|
|
- [ ] Design disaster recovery
|
2018-11-10 21:34:04 +01:00
|
|
|
- [ ] Automatic synchronization of other state files - see https://gitlab.com/steveeJ/nix-expressions/issues/2
|
2024-11-15 10:17:56 +01:00
|
|
|
- [ ] Recycle _\_archived_
|
2022-11-03 16:48:06 +01:00
|
|
|
- [ ] container migrations
|
|
|
|
- [ ] ensure DDNS is updated _before_ the containers are started
|
|
|
|
|
2018-11-05 13:58:06 +01:00
|
|
|
## Bugs
|
2024-11-15 10:17:56 +01:00
|
|
|
|
2018-11-05 13:58:06 +01:00
|
|
|
- [ ] home-manager leaves ~/.gnupg at 0755
|
|
|
|
|
2018-10-30 13:38:36 +01:00
|
|
|
## Usage
|
2024-11-15 10:17:56 +01:00
|
|
|
|
|
|
|
_(These are reminders for my future self)_
|
2018-10-30 13:38:36 +01:00
|
|
|
|
|
|
|
```
|
|
|
|
just --list
|
|
|
|
```
|
2018-11-04 01:39:37 +01:00
|
|
|
|
|
|
|
## Bootstrap
|
|
|
|
|
|
|
|
### A new machine
|
|
|
|
|
2024-11-15 10:17:56 +01:00
|
|
|
- ensure the dotfiles repo has a branch with the new machine's hostname
|
|
|
|
|
|
|
|
- boot with an install media and go through setup
|
2019-11-28 01:05:57 +01:00
|
|
|
|
|
|
|
#### Post-Install Setup
|
2024-11-15 10:17:56 +01:00
|
|
|
|
|
|
|
- `chmod --recursive g-rwx,o-rwx ~/.gnupg`
|
|
|
|
- `gpg2 --edit-card; fetch`
|
|
|
|
- clone password-manager and infra repositories
|
|
|
|
- gpg2: ultimately trust my own key
|
2022-10-30 15:40:58 +01:00
|
|
|
|
|
|
|
## Swapping out a disk
|
|
|
|
|
|
|
|
1. offline-bitwise copy of drive
|
|
|
|
2. disconnect remove the previous drive
|
|
|
|
3. replace the driveId in the device's hw.nix
|
2024-01-18 14:59:17 +00:00
|
|
|
4. run the `just disk-relabel nix/os/devices/<deviceName> <prevDiskId>` command to rename the filesystem and volume group
|
|
|
|
|
|
|
|
## Rebuilding an offline system
|
|
|
|
|
|
|
|
```
|
|
|
|
(
|
|
|
|
sudo cryptsetup open /dev/sdb3 steveej-t14s-cryptroot
|
|
|
|
sleep 5
|
|
|
|
|
|
|
|
sudo mkdir -p /mnt/root
|
|
|
|
sudo mount /dev/mapper/nvme--WD_BLACK_SN850X_4000GB_2227DT443901-root /mnt/root -o subvol=nixos
|
|
|
|
sudo mount /dev/sdb2 /mnt/root/boot
|
|
|
|
sudo mount /dev/mapper/nvme--WD_BLACK_SN850X_4000GB_2227DT443901-root /mnt/root/home -o subvol=home
|
|
|
|
|
|
|
|
sudo nixos-install -v --flake .#steveej-t14 --root /mnt/root/ --no-root-password
|
|
|
|
)
|
|
|
|
```
|