diff --git a/nixos/modules/services/network-filesystems/u9fs.nix b/nixos/modules/services/network-filesystems/u9fs.nix index 64809727464..8bc37f0f62c 100644 --- a/nixos/modules/services/network-filesystems/u9fs.nix +++ b/nixos/modules/services/network-filesystems/u9fs.nix @@ -27,10 +27,17 @@ in ''; }; + 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, @@ -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; 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; }; }; };