aboutsummaryrefslogtreecommitdiffhomepage
path: root/hst
diff options
context:
space:
mode:
authorOphestra <cat@gensokyo.uk>2025-08-25 19:13:31 +0900
committerOphestra <cat@gensokyo.uk>2025-08-25 19:24:33 +0900
commit0dcac55a0c3fcbb2d48028a4474ccecb37bb22fc (patch)
treed4f4440ac8ce805cbc46b8658572fe7a702d78fd /hst
parent6d202d73b41d28166f7bea7da36d1ce054711ff9 (diff)
hst/config: remove container etc field
This no longer needs special treatment since it can be specified as a generic filesystem entry. Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'hst')
-rw-r--r--hst/config.go5
-rw-r--r--hst/hst.go5
-rw-r--r--hst/hst_test.go10
3 files changed, 9 insertions, 11 deletions
diff --git a/hst/config.go b/hst/config.go
index e2f95d14..8f17de97 100644
--- a/hst/config.go
+++ b/hst/config.go
@@ -98,11 +98,6 @@ type (
Filesystem []FilesystemConfigJSON `json:"filesystem"`
// create symlinks inside container filesystem
Link []LinkConfig `json:"symlink"`
-
- // read-only /etc directory
- Etc *container.Absolute `json:"etc,omitempty"`
- // automatically set up /etc symlinks
- AutoEtc bool `json:"auto_etc"`
}
LinkConfig struct {
diff --git a/hst/hst.go b/hst/hst.go
index 6654a4b7..6d0f9a2f 100644
--- a/hst/hst.go
+++ b/hst/hst.go
@@ -98,6 +98,7 @@ func Template() *Config {
},
Filesystem: []FilesystemConfigJSON{
{&FSBind{container.AbsFHSRoot, container.AbsFHSVarLib.Append("hakurei/base/org.debian"), true, false, false, true}},
+ {&FSBind{container.AbsFHSEtc, container.AbsFHSEtc, false, false, false, true}},
{&FSEphemeral{Target: container.AbsFHSTmp, Write: true, Perm: 0755}},
{&FSOverlay{
Target: container.MustAbs("/nix/store"),
@@ -112,9 +113,7 @@ func Template() *Config {
Target: container.MustAbs("/data/data/org.chromium.Chromium"), Write: true}},
{&FSBind{Source: container.AbsFHSDev.Append("dri"), Device: true, Optional: true}},
},
- Link: []LinkConfig{{container.AbsFHSRunUser.Append("65534"), container.FHSRunUser + "150"}},
- Etc: container.AbsFHSEtc,
- AutoEtc: true,
+ Link: []LinkConfig{{container.AbsFHSRunUser.Append("65534"), container.FHSRunUser + "150"}},
},
}
}
diff --git a/hst/hst_test.go b/hst/hst_test.go
index 897bf930..553533b0 100644
--- a/hst/hst_test.go
+++ b/hst/hst_test.go
@@ -110,6 +110,12 @@ func TestTemplate(t *testing.T) {
"special": true
},
{
+ "type": "bind",
+ "dst": "/etc/",
+ "src": "/etc/",
+ "special": true
+ },
+ {
"type": "ephemeral",
"dst": "/tmp/",
"write": true,
@@ -154,9 +160,7 @@ func TestTemplate(t *testing.T) {
"target": "/run/user/65534",
"linkname": "/run/user/150"
}
- ],
- "etc": "/etc/",
- "auto_etc": true
+ ]
}
}`