diff options
| author | Ophestra <cat@gensokyo.uk> | 2025-08-03 20:46:41 +0900 |
|---|---|---|
| committer | Ophestra <cat@gensokyo.uk> | 2025-08-03 21:16:45 +0900 |
| commit | c6be82bcf91fc4b6e61d9df40213e80367addbd8 (patch) | |
| tree | ee245cf214ff845f0d8a3eac0cc1a6064107112d /cmd/hpkg/with.go | |
| parent | 38245559dca0833dc078b982d59490eee53e168c (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/with.go')
| -rw-r--r-- | cmd/hpkg/with.go | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/cmd/hpkg/with.go b/cmd/hpkg/with.go index 7d9fc7b8..444b4e7e 100644 --- a/cmd/hpkg/with.go +++ b/cmd/hpkg/with.go @@ -5,6 +5,7 @@ import ( "path" "strings" + "hakurei.app/container" "hakurei.app/container/seccomp" "hakurei.app/hst" "hakurei.app/internal" @@ -52,9 +53,9 @@ func withNixDaemon( {Src: pathSet.nixPath, Dst: "/nix", Write: true, Must: true}, }, 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, @@ -93,11 +94,11 @@ func withCacheDir( {Src: workDir, Dst: path.Join(hst.Tmp, "bundle"), Must: true}, }, 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(workDir, "etc"), + Etc: path.Join(workDir, container.FHSEtc), AutoEtc: true, }, }, dropShell, beforeFail) |
