Reorganize services/ into category subfolders
Group service modules by category (media, network, vpn, identity, dev, desktop) to make the growing services/ dir easier to navigate. containers.nix stays at the top level since it's a shared backend, not a single-category service. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -11,7 +11,10 @@ Pi 3B+ DNS/DHCP, aarch64). See `README.md` for the full install/deploy walkthrou
|
||||
```
|
||||
flake.nix # nixosConfigurations: real hosts + test/util targets
|
||||
common.nix # shared base: user darman (key-only ssh), nix settings, firewall :22, tz
|
||||
services/*.nix # one reusable NixOS module per service; each opens ITS OWN firewall ports
|
||||
services/<cat>/*.nix # one reusable NixOS module per service, grouped by category
|
||||
# (media, network, vpn, identity, dev, desktop); each opens
|
||||
# ITS OWN firewall ports. services/containers.nix (podman
|
||||
# backend) stays at the top level, shared across categories.
|
||||
hosts/<h>/ # configuration.nix + disk-config.nix (disko) + hardware-configuration.nix + secrets.nix
|
||||
secrets/<h>.yaml # sops-nix, age-encrypted per host
|
||||
scripts/deploy # config-agnostic deploy wrapper (all args mandatory)
|
||||
@@ -19,9 +22,9 @@ scripts/edit_secrets
|
||||
.sops.yaml # per-host encryption rules (admin key + each host's key)
|
||||
```
|
||||
|
||||
A host = `common.nix` + the `services/*` modules it imports + its `hosts/<h>/configuration.nix`.
|
||||
`services/` modules are engine-agnostic and shared across hosts (e.g. `tailscale.nix`,
|
||||
`caddy.nix` used by jupiter and neptun).
|
||||
A host = `common.nix` + the `services/**` modules it imports + its `hosts/<h>/configuration.nix`.
|
||||
`services/` modules are engine-agnostic and shared across hosts (e.g. `services/vpn/tailscale.nix`,
|
||||
`services/network/caddy.nix` used by jupiter and neptun).
|
||||
|
||||
## Commands
|
||||
|
||||
@@ -73,7 +76,7 @@ nix build .#nixosConfigurations.jupiter-vbox.config.system.build.virtualBoxOVA
|
||||
`/etc/nix/nix.custom.conf` (NOT `/etc/nix/nix.conf` — Determinate Nix regenerates that)
|
||||
+ `qemu-user-static-binfmt`, else emulated builds fail with "platform mismatch". Or
|
||||
build on the Pi with `--build-host darman@<ip>`.
|
||||
- **pihole on mercury is a CONTAINER** (`services/pihole.nix`, official image, host
|
||||
- **pihole on mercury is a CONTAINER** (`services/network/pihole.nix`, official image, host
|
||||
networking, caps NET_ADMIN/NET_RAW/SYS_NICE/CHOWN, `FTLCONF_*` env config). The native
|
||||
`services.pihole-ftl` module **segfaults on the Pi 3B+ aarch64** — do not switch back.
|
||||
- **`services.unbound.resolveLocalQueries = false`** is required: unbound listens on
|
||||
|
||||
Reference in New Issue
Block a user