aboutsummaryrefslogtreecommitdiffhomepage
path: root/nixos.nix
diff options
context:
space:
mode:
authorOphestra <cat@gensokyo.uk>2025-12-27 22:09:55 +0900
committerOphestra <cat@gensokyo.uk>2025-12-27 22:14:33 +0900
commite7982b4ee9cc935d6b89f291087524cdee229d09 (patch)
tree2a6a20431cd18c2c0ca73c0a9a454734e5866a5e /nixos.nix
parentef1ebf12d98359c0d75ce48a1b05737f7e4e93c0 (diff)
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 <cat@gensokyo.uk>
Diffstat (limited to 'nixos.nix')
-rw-r--r--nixos.nix7
1 files changed, 2 insertions, 5 deletions
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}
'';