From 04a27c8e475c084b7dc94b00f57d7fd77201ee57 Mon Sep 17 00:00:00 2001 From: Ophestra Date: Sat, 11 Oct 2025 13:42:54 +0900 Subject: hst: use plausible overlay template The current value is copied from a test case, and does not resemble its intended use case. Signed-off-by: Ophestra --- hst/config.go | 4 ++-- hst/hst.go | 6 +++--- hst/hst_test.go | 6 +++--- 3 files changed, 8 insertions(+), 8 deletions(-) (limited to 'hst') diff --git a/hst/config.go b/hst/config.go index a0843aeb..9d0ef67a 100644 --- a/hst/config.go +++ b/hst/config.go @@ -57,11 +57,11 @@ type ( // Init user namespace supplementary groups inherited by all container processes. Groups []string `json:"groups"` - // High level configuration applied to the underlying [container.Params]. + // High level configuration applied to the underlying [container]. Container *ContainerConfig `json:"container"` } - // ContainerConfig describes the container configuration to be applied to an underlying [container.Params]. + // ContainerConfig describes the container configuration to be applied to an underlying [container]. ContainerConfig struct { // Container UTS namespace hostname. Hostname string `json:"hostname,omitempty"` diff --git a/hst/hst.go b/hst/hst.go index fa949568..575869e6 100644 --- a/hst/hst.go +++ b/hst/hst.go @@ -117,9 +117,9 @@ func Template() *Config { {&FSEphemeral{Target: fhs.AbsTmp, Write: true, Perm: 0755}}, {&FSOverlay{ Target: check.MustAbs("/nix/store"), - Lower: []*check.Absolute{check.MustAbs("/mnt-root/nix/.ro-store")}, - Upper: check.MustAbs("/mnt-root/nix/.rw-store/upper"), - Work: check.MustAbs("/mnt-root/nix/.rw-store/work"), + Lower: []*check.Absolute{fhs.AbsVarLib.Append("hakurei/base/org.nixos/ro-store")}, + Upper: fhs.AbsVarLib.Append("hakurei/nix/u0/org.chromium.Chromium/rw-store/upper"), + Work: fhs.AbsVarLib.Append("hakurei/nix/u0/org.chromium.Chromium/rw-store/work"), }}, {&FSBind{Source: check.MustAbs("/nix/store")}}, {&FSLink{Target: fhs.AbsRun.Append("current-system"), Linkname: "/run/current-system", Dereference: true}}, diff --git a/hst/hst_test.go b/hst/hst_test.go index 0bd6c2b0..301704bf 100644 --- a/hst/hst_test.go +++ b/hst/hst_test.go @@ -193,10 +193,10 @@ func TestTemplate(t *testing.T) { "type": "overlay", "dst": "/nix/store", "lower": [ - "/mnt-root/nix/.ro-store" + "/var/lib/hakurei/base/org.nixos/ro-store" ], - "upper": "/mnt-root/nix/.rw-store/upper", - "work": "/mnt-root/nix/.rw-store/work" + "upper": "/var/lib/hakurei/nix/u0/org.chromium.Chromium/rw-store/upper", + "work": "/var/lib/hakurei/nix/u0/org.chromium.Chromium/rw-store/work" }, { "type": "bind", -- cgit v1.3.1