Add wrapper for fusermount, set correct PATH for rclone service

This commit is contained in:
Erwin Boskma 2022-07-12 23:46:31 +02:00
parent 6de2301588
commit 9a42f090b0
Signed by: erwin
GPG key ID: 270B20D17394F7E5
2 changed files with 13 additions and 2 deletions

View file

@ -56,11 +56,15 @@ in
Unit = {
Description = "rclone mount ${unitName}";
After = [ "network.target" ];
AssertPathIsDirectory = (toString mount.local);
};
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}";
ExecStop = "${pkgs.fuse}/bin/fusermount -zu ${mount.local}";
Environment = [
"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";
RestartSec = 10;
};

View file

@ -24,6 +24,8 @@ in
programs = {
dconf.enable = true;
fuse.userAllowOther = true;
seahorse.enable = true;
steam.enable = true;
@ -73,6 +75,11 @@ in
startSession = true;
};
pki.certificates = [ (builtins.readFile ./horus-ca.pem) ];
wrappers = {
fusermount.source = "${pkgs.fuse}/bin/fusermount";
};
};
environment = {