Compare commits
2 Commits
300571af47
...
b0cbf62e15
Author | SHA1 | Date | |
---|---|---|---|
b0cbf62e15 | |||
21646d382b |
@ -101,6 +101,7 @@ var testCasesNixos = []sealTestCase{
|
|||||||
"HOME=/var/lib/persist/module/fortify/0/1",
|
"HOME=/var/lib/persist/module/fortify/0/1",
|
||||||
"PULSE_COOKIE=" + fst.Tmp + "/pulse-cookie",
|
"PULSE_COOKIE=" + fst.Tmp + "/pulse-cookie",
|
||||||
"PULSE_SERVER=unix:/run/user/1971/pulse/native",
|
"PULSE_SERVER=unix:/run/user/1971/pulse/native",
|
||||||
|
"SHELL=/run/current-system/sw/bin/zsh",
|
||||||
"TERM=xterm-256color",
|
"TERM=xterm-256color",
|
||||||
"USER=u0_a1",
|
"USER=u0_a1",
|
||||||
"WAYLAND_DISPLAY=wayland-0",
|
"WAYLAND_DISPLAY=wayland-0",
|
||||||
|
@ -41,6 +41,7 @@ var testCasesPd = []sealTestCase{
|
|||||||
Args: []string{"/run/current-system/sw/bin/zsh"},
|
Args: []string{"/run/current-system/sw/bin/zsh"},
|
||||||
Env: []string{
|
Env: []string{
|
||||||
"HOME=/home/chronos",
|
"HOME=/home/chronos",
|
||||||
|
"SHELL=/run/current-system/sw/bin/zsh",
|
||||||
"TERM=xterm-256color",
|
"TERM=xterm-256color",
|
||||||
"USER=chronos",
|
"USER=chronos",
|
||||||
"XDG_RUNTIME_DIR=/run/user/65534",
|
"XDG_RUNTIME_DIR=/run/user/65534",
|
||||||
@ -259,6 +260,7 @@ var testCasesPd = []sealTestCase{
|
|||||||
"HOME=/home/chronos",
|
"HOME=/home/chronos",
|
||||||
"PULSE_COOKIE=" + fst.Tmp + "/pulse-cookie",
|
"PULSE_COOKIE=" + fst.Tmp + "/pulse-cookie",
|
||||||
"PULSE_SERVER=unix:/run/user/65534/pulse/native",
|
"PULSE_SERVER=unix:/run/user/65534/pulse/native",
|
||||||
|
"SHELL=/run/current-system/sw/bin/zsh",
|
||||||
"TERM=xterm-256color",
|
"TERM=xterm-256color",
|
||||||
"USER=chronos",
|
"USER=chronos",
|
||||||
"WAYLAND_DISPLAY=wayland-0",
|
"WAYLAND_DISPLAY=wayland-0",
|
||||||
|
@ -255,8 +255,9 @@ func (seal *outcome) finalise(ctx context.Context, sys sys.State, config *fst.Co
|
|||||||
mapuid = newInt(uid)
|
mapuid = newInt(uid)
|
||||||
mapgid = newInt(gid)
|
mapgid = newInt(gid)
|
||||||
if seal.env == nil {
|
if seal.env == nil {
|
||||||
seal.env = make(map[string]string)
|
seal.env = make(map[string]string, 1<<6)
|
||||||
}
|
}
|
||||||
|
seal.env[shell] = shellPath
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -88,11 +88,11 @@ in
|
|||||||
|
|
||||||
conf = {
|
conf = {
|
||||||
inherit (app) id;
|
inherit (app) id;
|
||||||
path = pkgs.writeScript "${app.name}-start" ''
|
path = if app.path == null then pkgs.writeScript "${app.name}-start" ''
|
||||||
#!${pkgs.zsh}${pkgs.zsh.shellPath}
|
#!${pkgs.zsh}${pkgs.zsh.shellPath}
|
||||||
${script}
|
${script}
|
||||||
'';
|
'' else app.path;
|
||||||
args = [ "${app.name}-start" ];
|
args = if app.args == null then [ "${app.name}-start" ] else app.args;
|
||||||
|
|
||||||
confinement = {
|
confinement = {
|
||||||
app_id = aid;
|
app_id = aid;
|
||||||
|
18
options.nix
18
options.nix
@ -94,6 +94,24 @@ in
|
|||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
path = mkOption {
|
||||||
|
type = nullOr str;
|
||||||
|
default = null;
|
||||||
|
description = ''
|
||||||
|
Custom executable path.
|
||||||
|
Setting this to null will default to the start script.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
args = mkOption {
|
||||||
|
type = nullOr (listOf str);
|
||||||
|
default = null;
|
||||||
|
description = ''
|
||||||
|
Custom args.
|
||||||
|
Setting this to null will default to script name.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
script = mkOption {
|
script = mkOption {
|
||||||
type = nullOr str;
|
type = nullOr str;
|
||||||
default = null;
|
default = null;
|
||||||
|
Loading…
Reference in New Issue
Block a user