Add wrapper for fusermount, set correct PATH for rclone service
This commit is contained in:
parent
6de2301588
commit
9a42f090b0
2 changed files with 13 additions and 2 deletions
|
@ -56,11 +56,15 @@ in
|
||||||
Unit = {
|
Unit = {
|
||||||
Description = "rclone mount ${unitName}";
|
Description = "rclone mount ${unitName}";
|
||||||
After = [ "network.target" ];
|
After = [ "network.target" ];
|
||||||
|
AssertPathIsDirectory = (toString mount.local);
|
||||||
};
|
};
|
||||||
|
|
||||||
Service = {
|
Service = {
|
||||||
ExecStart = "${pkgs.rclone}/bin/rclone mount --vfs-cache-mode full --vfs-cache-poll-interval 5s --poll-interval 5s --dir-cache-time 10s ${rcloneConnectionString mount} ${mount.local}";
|
Environment = [
|
||||||
ExecStop = "${pkgs.fuse}/bin/fusermount -zu ${mount.local}";
|
"PATH=/run/wrappers/bin:$PATH"
|
||||||
|
];
|
||||||
|
ExecStart = "${pkgs.rclone}/bin/rclone mount --vfs-cache-mode full --vfs-cache-poll-interval 5s --poll-interval 5s --dir-cache-time 10s --umask 022 --allow-other ${rcloneConnectionString mount} ${mount.local}";
|
||||||
|
ExecStop = "/run/wrappers/bin/fusermount -zu ${mount.local}";
|
||||||
Restart = "on-failure";
|
Restart = "on-failure";
|
||||||
RestartSec = 10;
|
RestartSec = 10;
|
||||||
};
|
};
|
||||||
|
|
|
@ -24,6 +24,8 @@ in
|
||||||
programs = {
|
programs = {
|
||||||
dconf.enable = true;
|
dconf.enable = true;
|
||||||
|
|
||||||
|
fuse.userAllowOther = true;
|
||||||
|
|
||||||
seahorse.enable = true;
|
seahorse.enable = true;
|
||||||
|
|
||||||
steam.enable = true;
|
steam.enable = true;
|
||||||
|
@ -73,6 +75,11 @@ in
|
||||||
startSession = true;
|
startSession = true;
|
||||||
};
|
};
|
||||||
pki.certificates = [ (builtins.readFile ./horus-ca.pem) ];
|
pki.certificates = [ (builtins.readFile ./horus-ca.pem) ];
|
||||||
|
wrappers = {
|
||||||
|
fusermount.source = "${pkgs.fuse}/bin/fusermount";
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
environment = {
|
environment = {
|
||||||
|
|
Loading…
Reference in a new issue