aboutsummaryrefslogtreecommitdiffhomepage
path: root/hst
diff options
context:
space:
mode:
authorOphestra <cat@gensokyo.uk>2025-10-11 13:42:54 +0900
committerOphestra <cat@gensokyo.uk>2025-10-11 13:51:08 +0900
commit04a27c8e475c084b7dc94b00f57d7fd77201ee57 (patch)
tree1a4934fc7176be244532320bad1cafcd75819544 /hst
parent9e3df0905b28c336c3b9df95bd8dfbccd36b7e61 (diff)
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 <cat@gensokyo.uk>
Diffstat (limited to 'hst')
-rw-r--r--hst/config.go4
-rw-r--r--hst/hst.go6
-rw-r--r--hst/hst_test.go6
3 files changed, 8 insertions, 8 deletions
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",