From e7982b4ee9cc935d6b89f291087524cdee229d09 Mon Sep 17 00:00:00 2001 From: Ophestra Date: Sat, 27 Dec 2025 22:09:55 +0900 Subject: cmd/sharefs: create directory as root This optional behaviour is required on NixOS as it is otherwise impossible to set this up: systemd.mounts breaks startup order somehow even though my unit looks identical to generated ones, fileSystems does not support any kind of initialisation or ordering other than against other mount points. Signed-off-by: Ophestra --- nixos.nix | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'nixos.nix') diff --git a/nixos.nix b/nixos.nix index cccc1810..35486679 100644 --- a/nixos.nix +++ b/nixos.nix @@ -73,11 +73,7 @@ in NoNewPrivileges = true; }; script = '' - ${pkgs.coreutils}/bin/install \ - -dm0700 \ - -o ${cfg.sharefs.user} \ - -g ${cfg.sharefs.group} \ - ${cfg.sharefs.source} ${cfg.sharefs.name} + ${pkgs.coreutils}/bin/install -dm0 ${cfg.sharefs.name} exec ${cfg.package}/libexec/sharefs -f \ -o ${ @@ -91,6 +87,7 @@ in "setuid=$(id -u ${cfg.sharefs.user})" "setgid=$(id -g ${cfg.sharefs.group})" "source=${cfg.sharefs.source}" + "mkdir" ] } ${cfg.sharefs.name} ''; -- cgit v1.3.1