Watch
0
0
Fork
You've already forked hyperhive
0

Compare commits

..
4 changed files with 13 additions and 11 deletions

View file

@ -3,9 +3,9 @@
//! (`hive-c0re`) and the in-container harness binaries so they agree //! (`hive-c0re`) and the in-container harness binaries so they agree
//! on the lookup contract. //! on the lookup contract.
//! //!
//! At runtime, the path is read from `$HIVE_ASSETS_DIR`. Setting it is //! At runtime, the path is read from `$HIVE_ASSETS_DIR`. In nix
//! the deployment's job; this crate's contract is only that it names a //! builds that env var is set by the `hive-c0re` / `harness-base` modules
//! directory laid out like the packaged assets. //! to `${pkgs.hyperhive-assets}/share/hyperhive` (see `nix/assets.nix`).
//! For `cargo run` outside nix, set it yourself: //! For `cargo run` outside nix, set it yourself:
//! //!
//! ```sh //! ```sh
@ -34,10 +34,12 @@ fn dir() -> PathBuf {
match std::env::var("HIVE_ASSETS_DIR") { match std::env::var("HIVE_ASSETS_DIR") {
Ok(v) if !v.is_empty() => PathBuf::from(v), Ok(v) if !v.is_empty() => PathBuf::from(v),
_ => panic!( _ => panic!(
"HIVE_ASSETS_DIR is not set. A deployment sets it; when \ "HIVE_ASSETS_DIR is not set. Inside the nix-built systemd \
running a binary outside one, point it at a directory \ units this is wired automatically from \
with `branding/` and `prompts/` subdirs. See \ `pkgs.hyperhive-assets`; for `cargo run` outside nix, \
hive-sh4re/src/assets.rs for the contract.", set it to a directory laid out like \
`nix/assets.nix`'s output (branding/ + prompts/ \
subdirs). See hive-sh4re/src/assets.rs for the contract.",
), ),
} }
} }

View file

@ -6,7 +6,7 @@
}: }:
let let
# GUI processes run as the agent's own non-root user — the same user # GUI processes run as the agent's own non-root user — the same user
# hive-agent runs as (declared + home-chowned by ./user.nix) — so # hive-agent runs as (declared + home-chowned by harness-base.nix) — so
# weston, the wayland client, and the agent share one user session. # weston, the wayland client, and the agent share one user session.
# `hyperhive.user.name` is set per-agent by the meta-flake renderer. # `hyperhive.user.name` is set per-agent by the meta-flake renderer.
userName = config.hyperhive.user.name; userName = config.hyperhive.user.name;

View file

@ -280,7 +280,7 @@ in
# sandboxing always fails. Fall back to unsandboxed builds. # sandboxing always fails. Fall back to unsandboxed builds.
# Moot once every nix invocation in the container routes # Moot once every nix invocation in the container routes
# through the host daemon (the daemon governs sandboxing). # through the host daemon (the daemon governs sandboxing).
# See docs/gotchas.md and nix/agent-modules/default.nix. # See docs/gotchas.md and harness-base.nix.
nix.settings.sandbox-fallback = lib.mkForce true; nix.settings.sandbox-fallback = lib.mkForce true;
# Degrade to a local build when a remote builder is unreachable # Degrade to a local build when a remote builder is unreachable
# rather than failing the check. `fallback` is a client-side # rather than failing the check. `fallback` is a client-side

View file

@ -119,8 +119,8 @@ let
''; '';
# Per-bin split packages. Agent containers depend on the individual # Per-bin split packages. Agent containers depend on the individual
# bins they actually exec/PATH-need (see nix/agent-modules/packages.nix) # bins they actually exec/PATH-need (see harness-base.nix) instead
# instead of the `default` bundle — that keeps `hivectl` (dials the *host* # of the `default` bundle — that keeps `hivectl` (dials the *host*
# admin socket, unreachable from inside a container, drags in # admin socket, unreachable from inside a container, drags in
# `wireguard-tools`) and redundant binaries out of every agent's # `wireguard-tools`) and redundant binaries out of every agent's
# closure. # closure.