Files
nixos/ubuntu/README.md
T

64 lines
2.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` |
2026-11-19 17:32:09 -08:00
| Third-party apt repos (tailscale, Dux Labs PPA for niri, Noctalia) | `bootstrap.sh` | `bootstrap.sh` |
| niri + Noctalia config | `home-modules/niri` | Home Manager (validated at build time) |
2026-11-18 22:28:25 -08:00
| 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)
2026-11-19 17:32:09 -08:00
`etc/keyd/default.conf` applies to every keyboard except YubiKeys (`etc/keyd/iqunix.conf` covers the IQUNIX MG75, which skips the Alt/Meta swap):
2026-11-18 22:28:25 -08:00
- 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.
2026-11-19 17:32:09 -08:00
## Desktop (niri + Noctalia)
GNOME stays installed. Pick **Niri** or **Ubuntu** in the GDM session menu
(gear icon on the password screen).
- niri comes from `ppa:duxlabs/dux-repo`, pinned so the PPA's other packages
don't replace Ubuntu's. Noctalia (bar, launcher, lock, idle, wallpaper)
comes from `pkg.noctalia.dev`.
- Config: `home-modules/niri/config.kdl` and `home-modules/niri/noctalia.toml`.
`homesw` fails if either doesn't validate.
- Noctalia's settings UI writes to `~/.local/state/noctalia/settings.toml`,
which overrides `noctalia.toml`. Copy the keepers into the repo.
- Because of keyd, Mod+C/V/X never reach niri: center is on Mod+Backslash and
floating is on Mod+P. Mod+Shift+/ lists the binds.
- Closing the lid suspends only on battery, so a Bluetooth keyboard or mouse
can wake the screens while docked.
2026-11-18 22:28:25 -08:00
## 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.