u9fs service: switch user with systemd
Drop the broken fsRoot option.
This commit is contained in:
parent
d45ac41e87
commit
c7379b30dc
@ -27,10 +27,17 @@ in
|
|||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
user = mkOption {
|
||||||
|
type = types.str;
|
||||||
|
default = "nobody";
|
||||||
|
description =
|
||||||
|
"User to run u9fs under.";
|
||||||
|
};
|
||||||
|
|
||||||
extraArgs = mkOption {
|
extraArgs = mkOption {
|
||||||
type = types.str;
|
type = types.str;
|
||||||
default = "";
|
default = "";
|
||||||
example = "-a none -u nobody";
|
example = "-a none";
|
||||||
description =
|
description =
|
||||||
''
|
''
|
||||||
Extra arguments to pass on invocation,
|
Extra arguments to pass on invocation,
|
||||||
@ -38,13 +45,6 @@ in
|
|||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
fsroot = mkOption {
|
|
||||||
type = types.path;
|
|
||||||
default = "/";
|
|
||||||
example = "/srv";
|
|
||||||
description = "File system root to serve to clients.";
|
|
||||||
};
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
@ -63,9 +63,10 @@ in
|
|||||||
reloadIfChanged = true;
|
reloadIfChanged = true;
|
||||||
requires = [ "u9fs.socket" ];
|
requires = [ "u9fs.socket" ];
|
||||||
serviceConfig =
|
serviceConfig =
|
||||||
{ ExecStart = "-${pkgs.u9fs}/bin/u9fs ${cfg.extraArgs} ${cfg.fsroot}";
|
{ ExecStart = "-${pkgs.u9fs}/bin/u9fs ${cfg.extraArgs}";
|
||||||
StandardInput = "socket";
|
StandardInput = "socket";
|
||||||
StandardError = "journal";
|
StandardError = "journal";
|
||||||
|
User = cfg.user;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user