Archived
Compare commits
5
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9496efdd22 | ||
|
|
33c9506c7d | ||
|
|
abe3763cb3 | ||
|
|
744904b19f | ||
|
|
42da626397 |
No files matched your search
@@ -31,6 +31,33 @@ machines when deployed.
|
|||||||
the auto-installer (see `docs/auto-installer.md`). Never commit its
|
the auto-installer (see `docs/auto-installer.md`). Never commit its
|
||||||
contents; if `git status` ever shows it as trackable, something is wrong.
|
contents; if `git status` ever shows it as trackable, something is wrong.
|
||||||
|
|
||||||
|
### `pve.sweet.home` (the Proxmox node)
|
||||||
|
|
||||||
|
`pve.sweet.home` (`PROXMOX_HOST` in `scripts/env.sh`) is a real, live Proxmox
|
||||||
|
node hosting production VMs/containers — not a sandbox.
|
||||||
|
|
||||||
|
- **Read-only for existing state.** You may SSH in (or use `pvesm`, `qm
|
||||||
|
list`, `pct list`, `qm config`, `pct config`, the Proxmox API, etc.) to
|
||||||
|
inspect the node's config, storage, and any existing VM/container —
|
||||||
|
including ones this repo didn't create. Never modify, stop, restart,
|
||||||
|
delete, or reconfigure anything that already exists there (`qm set`,
|
||||||
|
`pct set`, `qm destroy`, `pct destroy`, `qm stop`, `pct stop`, snapshot
|
||||||
|
operations, storage changes, etc.) without the operator's explicit
|
||||||
|
go-ahead.
|
||||||
|
- **Test VMs/containers are allowed, but must be torn down.** You may create
|
||||||
|
a scratch VM or container on the node (e.g. via
|
||||||
|
`scripts/proxmox/create-proxmox-resource.sh` or raw `qm`/`pct create`) to
|
||||||
|
validate something. Anything you create this way must be destroyed again
|
||||||
|
in the same session, before ending the task — never leave a test
|
||||||
|
resource running on the node. Use a VMID/name that's obviously scratch
|
||||||
|
(and doesn't collide with a real flake target) so it's unambiguous what's
|
||||||
|
safe to remove.
|
||||||
|
- **No changes to production, ever, from an agent session** — this covers
|
||||||
|
both the node itself (Proxmox host config, storage pools, networking) and
|
||||||
|
any pre-existing guest. Anything beyond inspecting and tearing down your
|
||||||
|
own scratch resources is the operator's call to make manually, same as
|
||||||
|
the deploy commands above.
|
||||||
|
|
||||||
## Commands
|
## Commands
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
|
|||||||
@@ -13,24 +13,6 @@
|
|||||||
|
|
||||||
networking.networkmanager.enable = true; # Easiest to use and most distros use this by default.
|
networking.networkmanager.enable = true; # Easiest to use and most distros use this by default.
|
||||||
|
|
||||||
# No host declares a DNS search domain anywhere else, and cross-host
|
|
||||||
# references throughout this repo (vars.nfsServerHost, vars.nixCacheHost,
|
|
||||||
# vars.dockerHost, ...) are bare short names, not FQDNs -- resolving them
|
|
||||||
# depends entirely on whatever network stack happens to be in play
|
|
||||||
# picking up the DHCP-advertised domain as a search suffix. NetworkManager
|
|
||||||
# does that by default, which is why this went unnoticed on
|
|
||||||
# NetworkManager-managed hosts, but LXC containers (modules/platforms/lxc.nix
|
|
||||||
# force-disables NetworkManager and Proxmox writes their systemd-networkd
|
|
||||||
# config itself) never get one. Confirmed live on lxc-docker: systemd-resolved
|
|
||||||
# had no search domain for eth0, "server" failed to resolve
|
|
||||||
# ("Name or service not known") while "server.sweet.home" resolved fine via
|
|
||||||
# the same DNS server, so every NFS mount in modules/docker/mount-data.nix
|
|
||||||
# failed even after fixing the automount/mount=nfs bugs. This applies the
|
|
||||||
# search domain globally via systemd-resolved's own config rather than the
|
|
||||||
# per-link DHCP path, so it isn't at the mercy of whichever component owns
|
|
||||||
# a given host's interface file.
|
|
||||||
networking.search = [ vars.homeDomain ];
|
|
||||||
|
|
||||||
# Recommended over the true default (bypasses ZFS's own import safeguards)
|
# Recommended over the true default (bypasses ZFS's own import safeguards)
|
||||||
# per the option's own docs; matches hosts/docker/host.nix and
|
# per the option's own docs; matches hosts/docker/host.nix and
|
||||||
# modules/services/zfs/enable-service.nix, which already set this
|
# modules/services/zfs/enable-service.nix, which already set this
|
||||||
|
|||||||
@@ -9,11 +9,25 @@ let
|
|||||||
# (the VM platforms rely on automount itself to get that same
|
# (the VM platforms rely on automount itself to get that same
|
||||||
# non-blocking behavior, so they don't need `nofail` too).
|
# non-blocking behavior, so they don't need `nofail` too).
|
||||||
automountOpts = if config.boot.isContainer then [ "nofail" ] else [ "x-systemd.automount" ];
|
automountOpts = if config.boot.isContainer then [ "nofail" ] else [ "x-systemd.automount" ];
|
||||||
|
|
||||||
|
# A bare hostname here never resolves reliably: systemd-resolved only
|
||||||
|
# ever tries LLMNR for single-label names (never DNS, regardless of any
|
||||||
|
# configured search domain), and a *global* search domain (the first fix
|
||||||
|
# attempted here) backfires worse -- confirmed live on lxc-docker, adding
|
||||||
|
# `networking.search` made systemd-resolved prioritize its domain-matched
|
||||||
|
# but server-less global scope over eth0's correctly-configured one for
|
||||||
|
# every "*.sweet.home" query, silently sending them to public fallback
|
||||||
|
# DNS instead. `resolvectl query --interface=eth0 server.sweet.home`
|
||||||
|
# resolved fine throughout, proving the LAN DNS server was never the
|
||||||
|
# problem -- only the ambient, unqualified device string was. Using the
|
||||||
|
# FQDN directly sidesteps all of that, matching the pattern
|
||||||
|
# ../raspi/mount-data.nix already uses for the same reason.
|
||||||
|
nfsServer = "${vars.nfsServerHost}.${vars.homeDomain}";
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
fileSystems = {
|
fileSystems = {
|
||||||
${vars.nfsShares.dockerConfig.mountpoint} = {
|
${vars.nfsShares.dockerConfig.mountpoint} = {
|
||||||
device = "${vars.nfsServerHost}:${vars.storageRoot}/${vars.nfsShares.dockerConfig.subpath}";
|
device = "${nfsServer}:${vars.storageRoot}/${vars.nfsShares.dockerConfig.subpath}";
|
||||||
fsType = "nfs";
|
fsType = "nfs";
|
||||||
|
|
||||||
options = [
|
options = [
|
||||||
@@ -24,7 +38,7 @@ in
|
|||||||
};
|
};
|
||||||
|
|
||||||
${vars.nfsShares.dockerDatabases.mountpoint} = {
|
${vars.nfsShares.dockerDatabases.mountpoint} = {
|
||||||
device = "${vars.nfsServerHost}:${vars.storageRoot}/${vars.nfsShares.dockerDatabases.subpath}";
|
device = "${nfsServer}:${vars.storageRoot}/${vars.nfsShares.dockerDatabases.subpath}";
|
||||||
fsType = "nfs";
|
fsType = "nfs";
|
||||||
|
|
||||||
options = [
|
options = [
|
||||||
@@ -35,7 +49,7 @@ in
|
|||||||
};
|
};
|
||||||
|
|
||||||
${vars.nfsShares.dockerVolumes.mountpoint} = {
|
${vars.nfsShares.dockerVolumes.mountpoint} = {
|
||||||
device = "${vars.nfsServerHost}:${vars.storageRoot}/${vars.nfsShares.dockerVolumes.subpath}";
|
device = "${nfsServer}:${vars.storageRoot}/${vars.nfsShares.dockerVolumes.subpath}";
|
||||||
fsType = "nfs";
|
fsType = "nfs";
|
||||||
|
|
||||||
options = [
|
options = [
|
||||||
@@ -46,7 +60,7 @@ in
|
|||||||
};
|
};
|
||||||
|
|
||||||
${vars.nfsShares.nextcloudData.mountpoint} = {
|
${vars.nfsShares.nextcloudData.mountpoint} = {
|
||||||
device = "${vars.nfsServerHost}:${vars.storageRoot}/${vars.nfsShares.nextcloudData.subpath}";
|
device = "${nfsServer}:${vars.storageRoot}/${vars.nfsShares.nextcloudData.subpath}";
|
||||||
fsType = "nfs";
|
fsType = "nfs";
|
||||||
|
|
||||||
options = [
|
options = [
|
||||||
@@ -57,7 +71,7 @@ in
|
|||||||
};
|
};
|
||||||
|
|
||||||
${vars.nfsShares.raspiVolumes.mountpoint} = {
|
${vars.nfsShares.raspiVolumes.mountpoint} = {
|
||||||
device = "${vars.nfsServerHost}:${vars.storageRoot}/${vars.nfsShares.raspiVolumes.subpath}";
|
device = "${nfsServer}:${vars.storageRoot}/${vars.nfsShares.raspiVolumes.subpath}";
|
||||||
fsType = "nfs";
|
fsType = "nfs";
|
||||||
|
|
||||||
options = [
|
options = [
|
||||||
|
|||||||
Reference in new issue
Block a user