Skip to content
プロジェクト

oluceps/nixos-config has 55 GitHub stars and 0 forks. GitHot measured 0 stars in 24 hours. Last checked 2026-11-12 16:18 UTC. Last push 2026-11-04.

この数値の測り方

Configuration for describing my systems.

計測したスター増加

24時間
0
7日間
履歴を収集中
15日間
履歴を収集中
1か月
履歴を収集中

期間ごとの純増数です。期間は重複しており、日別の値ではありません。未計測の値は空欄です。スター数は注目度の指標であり、品質の保証ではありません。

NixOSs

nixos cfg works lint status

Declarative NixOS infrastructure with isolated workloads, explicit service identities, and controlled routes between services.

Architecture

Open either image for the full-size diagram.

Realm request paths and service identity boundaries Nix declarations, static catalogs, and generated system configuration

All diagrams and sources · Transparent agent · Local transport · Outbound example · Immich routing

Public Caddy terminates normal HTTPS. Its Ghostunnel proxies carry its Realm identity to private backends. Observability Caddy and Internet Caddy handle their own mutual TLS (mTLS). SPIRE supplies certificates through local Agents. Agents join with HTTP FQDN node attestation: the Server fetches a short-lived proof from an address pinned in registry.toml, without DNS or a join token, and the stable alias spiffe://nyaw.xyz/agent/<host> points to the attested http_fqdn Agent ID. The host realm-agent captures ordinary TCP/DNS for eligible isolated workloads and forwards through their existing declared egress sockets; SPIFFE authentication stays in the proxies and gateways.

Implemented security controls

These controls describe the declared configuration. Host imports and explicit workload exceptions determine where each control applies.

Boundary Control Implementation
Application → host Isolated systemd workloads use private networks, restricted capabilities, a hidden host /run, and explicit socket mounts. Workload isolation
Service → service SPIRE binds workload identity to unit and Unix user selectors. Clients check the server identity. Receivers enforce caller allowlists. SPIRE, client, receiver
Node → cluster Agents answer a short-lived HTTP FQDN challenge; the Server fetches the proof from a registry-pinned mesh address and issues the node SVID. Stable aliases map agent/<host> to the attested Agent ID. HTTP attestation, module
Proxy → host Realm proxies drop capabilities and use NoNewPrivileges, filesystem protection, syscall filters, and MemoryDenyWriteExecute. Sandbox, shared restrictions
Workload → Internet Caddy authenticates callers, filters private and selected special address ranges, and restricts upstream ports. Extra CONNECT ports require identity rules. Gateway policy, site rules
Repository → runtime secrets Vaultix manages encrypted secret files for configured recipients and hosts. Secret management
Administrator → host The shared SSH policy disables password authentication and trusts the configured user certificate authority. SSH policy
Boot and storage Selected hosts use Lanzaboote boot signing, LUKS volumes, and transient roots with explicit preserved paths. Secure Boot, disk layouts, preservation

SPIRE certificates default to a one-hour lifetime. Ghostunnel separately caps connection lifetime at one hour. Node identities come from HTTP FQDN attestation; workload identities come from the Agent's Workload API and are bound to unit and Unix user selectors. Applications use direct Unix sockets, loopback adapters, or the transparent worker to reach declared egress. The dedicated TLS gateways have direct SPIRE Agent access.

Defensive threat model

Assets: service data, runtime secrets, workload identities, and host integrity.

Attacker: an untrusted network client, a party that can influence DNS, or an attacker with code execution inside one unprivileged application.

Trusted base: host root and kernel, systemd, the realm-agent controller, SPIRE, registry and registration administrators, the trusted bootstrap transport, deployment keys, and the deployed Nix policy and inputs.

Threat Boundary and defense Remaining authority or limit
Network peer impersonates a service mTLS checks the expected service identity and receiver allowlist. DNS names do not grant identity. Public applications still need user and resource authorization.
Compromised application moves to another service Private networks, explicit socket access, and separate proxy accounts restrict reachable services and identity access. Its allowed routes remain usable. Allowed public egress can carry stolen data.
Rogue node or replayed proof The Server dials only the registry-pinned address. The 120-second challenge binds the FQDN, trust domain, Server ID, public-key thumbprint and session; the proof cannot approve another session. Mesh HTTP adds no encryption or peer authentication, so a compromised mesh router or registry can redirect bootstrap. Mesh membership does not grant service permissions.
SSRF targets private addresses or cloud metadata The Internet gateway filters DNS answers and checks literal and selected upstream addresses and ports. This policy covers the Internet gateway. Explicit internal routes retain their configured authority.
Reader obtains repository secret files Vaultix ciphertext requires an authorized decryption identity. The application can read its own runtime secrets. Host root can read decrypted secrets.
Attacker modifies boot files or reads a locked disk Selected hosts configure boot signing and encrypted volumes. Protection depends on host scope, firmware key enrollment, and volume state. Persistent paths survive reboot.

Gateway admission covers the listener. resolveHosts and NO_PROXY select routes and proxy behavior. They do not define per-domain or per-user authorization.

The model assumes the trusted base remains intact. Shared-kernel isolation does not establish a virtual-machine boundary. Certificate expiry does not terminate every existing TLS connection, and these controls do not guarantee availability.

Configuration and checks

Built with flake-parts, Vaultix, Lanzaboote, preservation, Disko, and nix-topology.

Realm reference · Deployment · HTTP attestation · Rollout · Observability · Hardening test record · VM tests · HTTP VM test · Identity metrics VM test

Inspect declared access and render the diagrams

Run from the repository root:

nix eval --json .#nixosConfigurations.eihort.config.realm.authorization.matrix
nix eval --json .#nixosConfigurations.eihort.config.realm.authorization.connections
bash layout/render.sh

The queries show configured access and connections. Check the running generation and service state separately when checking a deployment.

Generated network topology

Network topology

関連プロジェクトを探す