mirror of
https://github.com/kmein/niveum
synced 2026-03-16 10:11:08 +01:00
fix(cloud)
This commit is contained in:
@@ -9,10 +9,9 @@
|
|||||||
niveum = {
|
niveum = {
|
||||||
dropbox.enable = true;
|
dropbox.enable = true;
|
||||||
seafile.enable = true;
|
seafile.enable = true;
|
||||||
google-drive = rec {
|
google-drive = {
|
||||||
enable = true;
|
enable = true;
|
||||||
directory = "${user.home}/cloud/gdrive";
|
directory = "${config.users.users.me.home}/cloud/gdrive";
|
||||||
user = config.users.users.me;
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -6,7 +6,6 @@ in
|
|||||||
options.niveum.google-drive = {
|
options.niveum.google-drive = {
|
||||||
enable = mkEnableOption "Google Drive";
|
enable = mkEnableOption "Google Drive";
|
||||||
directory = mkOption { type = types.path; };
|
directory = mkOption { type = types.path; };
|
||||||
user = mkOption { type = types.attrs; };
|
|
||||||
};
|
};
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
@@ -14,15 +13,13 @@ in
|
|||||||
pkgs.grive2
|
pkgs.grive2
|
||||||
];
|
];
|
||||||
|
|
||||||
systemd.services.google-drive = {
|
systemd.user.services.google-drive = {
|
||||||
description = "Google Drive synchronisation service";
|
description = "Google Drive synchronisation service";
|
||||||
after = [ "network-online.target" ];
|
after = [ "network.target" ];
|
||||||
|
wantedBy = [ "default.target" ];
|
||||||
script = "${pkgs.grive2}/bin/grive -p ${cfg.directory}";
|
script = "${pkgs.grive2}/bin/grive -p ${cfg.directory}";
|
||||||
startAt = "*:0/5";
|
startAt = "*:0/5";
|
||||||
serviceConfig = {
|
serviceConfig.Type = "oneshot";
|
||||||
Type = "oneshot";
|
|
||||||
User = cfg.user.name;
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ in {
|
|||||||
wantedBy = [ "default.target" ];
|
wantedBy = [ "default.target" ];
|
||||||
script = "${pkgs.seafile-client}/bin/seafile-applet";
|
script = "${pkgs.seafile-client}/bin/seafile-applet";
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
|
Type = "forking";
|
||||||
Restart = "always";
|
Restart = "always";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user