1
0
mirror of https://github.com/kmein/niveum synced 2026-03-16 10:11:08 +01:00

feat: move google-drive over to google-drive-ocamlfuse because grive2 is broken

This commit is contained in:
Kierán Meinhardt
2020-09-20 23:29:59 +02:00
parent 13bee034fa
commit 7a9dd4c83e
2 changed files with 8 additions and 6 deletions

View File

@@ -8,15 +8,17 @@ in {
};
config = mkIf cfg.enable {
environment.systemPackages = [ pkgs.grive2 ];
systemd.user.services.google-drive = {
description = "Google Drive synchronisation service";
after = [ "network.target" ];
wantedBy = [ "default.target" ];
script = "${pkgs.grive2}/bin/grive -p ${cfg.directory}";
startAt = "*:0/5";
serviceConfig.Type = "oneshot";
preStart = "mkdir -p ${cfg.directory}";
script = "${pkgs.google-drive-ocamlfuse}/bin/google-drive-ocamlfuse ${cfg.directory}";
preStop = "${pkgs.fuse}/bin/fusermount -u ${cfg.directory}";
serviceConfig = {
Type = "oneshot";
RemainAfterExit = true;
};
};
};