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 = {
|
||||
dropbox.enable = true;
|
||||
seafile.enable = true;
|
||||
google-drive = rec {
|
||||
google-drive = {
|
||||
enable = true;
|
||||
directory = "${user.home}/cloud/gdrive";
|
||||
user = config.users.users.me;
|
||||
directory = "${config.users.users.me.home}/cloud/gdrive";
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
@@ -6,7 +6,6 @@ in
|
||||
options.niveum.google-drive = {
|
||||
enable = mkEnableOption "Google Drive";
|
||||
directory = mkOption { type = types.path; };
|
||||
user = mkOption { type = types.attrs; };
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
@@ -14,15 +13,13 @@ in
|
||||
pkgs.grive2
|
||||
];
|
||||
|
||||
systemd.services.google-drive = {
|
||||
systemd.user.services.google-drive = {
|
||||
description = "Google Drive synchronisation service";
|
||||
after = [ "network-online.target" ];
|
||||
after = [ "network.target" ];
|
||||
wantedBy = [ "default.target" ];
|
||||
script = "${pkgs.grive2}/bin/grive -p ${cfg.directory}";
|
||||
startAt = "*:0/5";
|
||||
serviceConfig = {
|
||||
Type = "oneshot";
|
||||
User = cfg.user.name;
|
||||
};
|
||||
serviceConfig.Type = "oneshot";
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
@@ -13,6 +13,7 @@ in {
|
||||
wantedBy = [ "default.target" ];
|
||||
script = "${pkgs.seafile-client}/bin/seafile-applet";
|
||||
serviceConfig = {
|
||||
Type = "forking";
|
||||
Restart = "always";
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user