aboutsummaryrefslogtreecommitdiffhomepage
path: root/cmd/hpkg/app.go
diff options
context:
space:
mode:
authorOphestra <cat@gensokyo.uk>2025-08-03 20:46:41 +0900
committerOphestra <cat@gensokyo.uk>2025-08-03 21:16:45 +0900
commitc6be82bcf91fc4b6e61d9df40213e80367addbd8 (patch)
treeee245cf214ff845f0d8a3eac0cc1a6064107112d /cmd/hpkg/app.go
parent38245559dca0833dc078b982d59490eee53e168c (diff)
container/path: fhs path constants
This increases readability since this can help disambiguate absolute paths from similarly named path segments. Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'cmd/hpkg/app.go')
-rw-r--r--cmd/hpkg/app.go19
1 files changed, 10 insertions, 9 deletions
diff --git a/cmd/hpkg/app.go b/cmd/hpkg/app.go
index 082bc28e..fb784d73 100644
--- a/cmd/hpkg/app.go
+++ b/cmd/hpkg/app.go
@@ -6,6 +6,7 @@ import (
"os"
"path"
+ "hakurei.app/container"
"hakurei.app/container/seccomp"
"hakurei.app/hst"
"hakurei.app/system"
@@ -94,17 +95,17 @@ func (app *appInfo) toFst(pathSet *appPathSet, argv []string, flagDropShell bool
Filesystem: []*hst.FilesystemConfig{
{Src: path.Join(pathSet.nixPath, "store"), Dst: "/nix/store", Must: true},
{Src: pathSet.metaPath, Dst: path.Join(hst.Tmp, "app"), Must: true},
- {Src: "/etc/resolv.conf"},
- {Src: "/sys/block"},
- {Src: "/sys/bus"},
- {Src: "/sys/class"},
- {Src: "/sys/dev"},
- {Src: "/sys/devices"},
+ {Src: container.FHSEtc + "resolv.conf"},
+ {Src: container.FHSSys + "block"},
+ {Src: container.FHSSys + "bus"},
+ {Src: container.FHSSys + "class"},
+ {Src: container.FHSSys + "dev"},
+ {Src: container.FHSSys + "devices"},
},
Link: [][2]string{
- {app.CurrentSystem, "/run/current-system"},
- {"/run/current-system/sw/bin", "/bin"},
- {"/run/current-system/sw/bin", "/usr/bin"},
+ {app.CurrentSystem, container.FHSRun + "current-system"},
+ {container.FHSRun + "current-system/sw/bin", "/bin"},
+ {container.FHSRun + "current-system/sw/bin", container.FHSUsrBin},
},
Etc: path.Join(pathSet.cacheDir, "etc"),
AutoEtc: true,