nix: set x-systemd options directly
All checks were successful
Test / ShareFS (push) Successful in 40s
Test / Sandbox (race detector) (push) Successful in 44s
Test / Create distribution (push) Successful in 43s
Test / Sandbox (push) Successful in 48s
Test / Hpkg (push) Successful in 49s
Test / Hakurei (push) Successful in 56s
Test / Hakurei (race detector) (push) Successful in 55s
Test / Flake checks (push) Successful in 1m36s
All checks were successful
Test / ShareFS (push) Successful in 40s
Test / Sandbox (race detector) (push) Successful in 44s
Test / Create distribution (push) Successful in 43s
Test / Sandbox (push) Successful in 48s
Test / Hpkg (push) Successful in 49s
Test / Hakurei (push) Successful in 56s
Test / Hakurei (race detector) (push) Successful in 55s
Test / Flake checks (push) Successful in 1m36s
NixOS generates two x-systemd.requires-mounts-for options for some reason, and there seems to be no knob for configuring ordering. Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
46
nixos.nix
46
nixos.nix
@@ -25,26 +25,34 @@ let
|
|||||||
getsubname = userid: appid: "u${toString userid}_a${toString appid}";
|
getsubname = userid: appid: "u${toString userid}_a${toString appid}";
|
||||||
getsubhome = userid: appid: "${cfg.stateDir}/u${toString userid}/a${toString appid}";
|
getsubhome = userid: appid: "${cfg.stateDir}/u${toString userid}/a${toString appid}";
|
||||||
|
|
||||||
mountpoints = {
|
mountpoints =
|
||||||
${cfg.sharefs.name} = mkIf (cfg.sharefs.source != null) {
|
let
|
||||||
depends = [ cfg.sharefs.source ];
|
after = "sys-module-fuse.device";
|
||||||
device = "sharefs";
|
before = "nix-daemon.socket";
|
||||||
fsType = "fuse.sharefs";
|
in
|
||||||
noCheck = true;
|
{
|
||||||
options = [
|
${cfg.sharefs.name} = mkIf (cfg.sharefs.source != null) {
|
||||||
"rw"
|
device = "sharefs";
|
||||||
"noexec"
|
fsType = "fuse.sharefs";
|
||||||
"nosuid"
|
options = [
|
||||||
"nodev"
|
"rw"
|
||||||
"noatime"
|
"noexec"
|
||||||
"allow_other"
|
"nosuid"
|
||||||
"mkdir"
|
"nodev"
|
||||||
"source=${cfg.sharefs.source}"
|
"noatime"
|
||||||
"setuid=${toString config.users.users.${cfg.sharefs.user}.uid}"
|
"allow_other"
|
||||||
"setgid=${toString config.users.groups.${cfg.sharefs.group}.gid}"
|
"mkdir"
|
||||||
];
|
"source=${cfg.sharefs.source}"
|
||||||
|
"setuid=${toString config.users.users.${cfg.sharefs.user}.uid}"
|
||||||
|
"setgid=${toString config.users.groups.${cfg.sharefs.group}.gid}"
|
||||||
|
|
||||||
|
"x-systemd.requires=${after}"
|
||||||
|
"x-systemd.before=${before}"
|
||||||
|
"x-systemd.required-by=${before}"
|
||||||
|
"x-systemd.requires-mounts-for=${cfg.sharefs.source}"
|
||||||
|
];
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
|
||||||
in
|
in
|
||||||
|
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user