u9fs service: switch user with systemd

Drop the broken fsRoot option.

Changed files
+10 -9
nixos
modules
services
network-filesystems
+10 -9
nixos/modules/services/network-filesystems/u9fs.nix
···
'';
};
+
user = mkOption {
+
type = types.str;
+
default = "nobody";
+
description =
+
"User to run u9fs under.";
+
};
+
extraArgs = mkOption {
type = types.str;
default = "";
-
example = "-a none -u nobody";
+
example = "-a none";
description =
''
Extra arguments to pass on invocation,
see <command>man 4 u9fs</command>
'';
-
};
-
-
fsroot = mkOption {
-
type = types.path;
-
default = "/";
-
example = "/srv";
-
description = "File system root to serve to clients.";
};
};
···
reloadIfChanged = true;
requires = [ "u9fs.socket" ];
serviceConfig =
-
{ ExecStart = "-${pkgs.u9fs}/bin/u9fs ${cfg.extraArgs} ${cfg.fsroot}";
+
{ ExecStart = "-${pkgs.u9fs}/bin/u9fs ${cfg.extraArgs}";
StandardInput = "socket";
StandardError = "journal";
+
User = cfg.user;
};
};
};