Files
nixos/ubuntu/README.md
T

46 lines
1.9 KiB
Markdown
Raw Normal View History

2026-11-18 22:28:25 -08:00
# Ubuntu machines
Ubuntu machines are managed in layers:
| Layer | Where | Applied by |
|---|---|---|
| User env: CLI tools, dotfiles, fonts, ssh hosts | `hosts/ubuntu/home.nix` | Home Manager |
| Desktop apps (flatpak) | `services.flatpak` in `hosts/ubuntu/home.nix` | nix-flatpak, on HM activation |
| OS packages | `apt-packages.txt` | `bootstrap.sh` |
| Third-party apt repos (tailscale/docker) | `bootstrap.sh` | `bootstrap.sh` |
| System config files | `etc/**`, mirrored into `/etc` | `bootstrap.sh` |
| Self-updating tools from upstream installers (mise, herdr, tuicr) into `~/.local/bin` | `bootstrap.sh` | `bootstrap.sh tools` (kept up to date with update commands) |
## Fresh machine
```sh
sudo apt install -y git curl
git clone <this repo> ~/nixos
~/nixos/ubuntu/bootstrap.sh
sudo tailscale up
# log out and back in
```
After that:
- `homesw`: Home Manager only.
- `syssw`: everything (same as running `bootstrap.sh`).
## Keyboard (keyd)
`etc/keyd/default.conf` applies to every keyboard except YubiKeys:
- Caps Lock and Left Control are swapped.
- Left Alt and Left Meta are swapped, so the key next to space is Meta.
- Meta+C, Meta+V and Meta+X copy, paste and cut. keyd sends Ctrl+Insert,
Shift+Insert and Ctrl+X, the same as omarchy's Hyprland binds. These work
in GTK/Qt apps, browsers and Electron. Ghostty gets the matching bindings
in `home-modules/ghostty-config.nix`.
To test keyd: `sudo keyd.rvaiya monitor`. To bypass a broken config: press Backspace+Escape+Enter together, which kills keyd.
## TODO
- [ ] **YubiKey**: port `modules/nixos/yubikey` and `home-modules/sops.nix`. ykman and pcscd from apt, the udev rule plus yubikey-up/down scripts in `etc/`, the sops age key from cold storage, and the `id_yubikey` identity files in the ssh config.
- [ ] **system-manager**: explore [numtide/system-manager](https://github.com/numtide/system-manager) to move `etc/` and the systemd service setup into Nix.