From c7379b30dc365af07f222b67e4daac2775164934 Mon Sep 17 00:00:00 2001 From: Emery Hemingway Date: Fri, 8 Apr 2016 16:32:30 +0200 Subject: u9fs service: switch user with systemd Drop the broken fsRoot option. --- nixos/modules/services/network-filesystems/u9fs.nix | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) (limited to 'nixos/modules/services/network-filesystems') diff --git a/nixos/modules/services/network-filesystems/u9fs.nix b/nixos/modules/services/network-filesystems/u9fs.nix index 648097274641..8bc37f0f62c3 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; }; }; }; -- cgit 1.4.1