diff options
Diffstat (limited to 'cmd/hpkg')
| -rw-r--r-- | cmd/hpkg/app.go | 4 | ||||
| -rw-r--r-- | cmd/hpkg/with.go | 8 |
2 files changed, 6 insertions, 6 deletions
diff --git a/cmd/hpkg/app.go b/cmd/hpkg/app.go index 37c114c8..5fd5e640 100644 --- a/cmd/hpkg/app.go +++ b/cmd/hpkg/app.go @@ -78,8 +78,7 @@ func (app *appInfo) toHst(pathSet *appPathSet, pathname *container.Absolute, arg Username: "hakurei", Shell: pathShell, - Data: pathSet.homeDir, - Dir: pathDataData.Append(app.ID), + Home: pathDataData.Append(app.ID), Identity: app.Identity, Groups: app.Groups, @@ -106,6 +105,7 @@ func (app *appInfo) toHst(pathSet *appPathSet, pathname *container.Absolute, arg {FilesystemConfig: &hst.FSBind{Source: container.AbsFHSSys.Append("class"), Optional: true}}, {FilesystemConfig: &hst.FSBind{Source: container.AbsFHSSys.Append("dev"), Optional: true}}, {FilesystemConfig: &hst.FSBind{Source: container.AbsFHSSys.Append("devices"), Optional: true}}, + {FilesystemConfig: &hst.FSBind{Target: pathDataData.Append(app.ID), Source: pathSet.homeDir, Write: true, Ensure: true}}, }, }, ExtraPerms: []*hst.ExtraPermConfig{ diff --git a/cmd/hpkg/with.go b/cmd/hpkg/with.go index 03b2e5f1..1895a06f 100644 --- a/cmd/hpkg/with.go +++ b/cmd/hpkg/with.go @@ -33,8 +33,7 @@ func withNixDaemon( Username: "hakurei", Shell: pathShell, - Data: pathSet.homeDir, - Dir: pathDataData.Append(app.ID), + Home: pathDataData.Append(app.ID), ExtraPerms: []*hst.ExtraPermConfig{ {Path: dataHome, Execute: true}, {Ensure: true, Path: pathSet.baseDir, Read: true, Write: true, Execute: true}, @@ -54,6 +53,7 @@ func withNixDaemon( {FilesystemConfig: &hst.FSLink{Target: pathCurrentSystem, Linkname: app.CurrentSystem.String()}}, {FilesystemConfig: &hst.FSLink{Target: pathBin, Linkname: pathSwBin.String()}}, {FilesystemConfig: &hst.FSLink{Target: container.AbsFHSUsrBin, Linkname: pathSwBin.String()}}, + {FilesystemConfig: &hst.FSBind{Target: pathDataData.Append(app.ID), Source: pathSet.homeDir, Write: true, Ensure: true}}, }, }, }), dropShell, beforeFail) @@ -71,8 +71,7 @@ func withCacheDir( Username: "nixos", Shell: pathShell, - Data: pathSet.cacheDir, // this also ensures cacheDir via shim - Dir: pathDataData.Append(app.ID, "cache"), + Home: pathDataData.Append(app.ID, "cache"), ExtraPerms: []*hst.ExtraPermConfig{ {Path: dataHome, Execute: true}, {Ensure: true, Path: pathSet.baseDir, Read: true, Write: true, Execute: true}, @@ -92,6 +91,7 @@ func withCacheDir( {FilesystemConfig: &hst.FSLink{Target: pathBin, Linkname: pathSwBin.String()}}, {FilesystemConfig: &hst.FSLink{Target: container.AbsFHSUsrBin, Linkname: pathSwBin.String()}}, {FilesystemConfig: &hst.FSBind{Source: workDir, Target: hst.AbsTmp.Append("bundle")}}, + {FilesystemConfig: &hst.FSBind{Target: pathDataData.Append(app.ID, "cache"), Source: pathSet.cacheDir, Write: true, Ensure: true}}, }, }, }, dropShell, beforeFail) |
