Modularize nextcloud and remove need for GUI application
This commit is contained in:
parent
8d35835f89
commit
ee2b51bbc1
6 changed files with 74 additions and 47 deletions
|
|
@ -36,46 +36,4 @@
|
|||
};
|
||||
};
|
||||
|
||||
# config =
|
||||
# let
|
||||
# username = config.mods.nextcloud.username;
|
||||
# password = config.sops.secrets.nextcloud;
|
||||
# url = config.mods.nextcloud.url;
|
||||
# synclist = config.mods.nextcloud.synclist;
|
||||
# name = "test";
|
||||
# local = "test";
|
||||
# remote = "test";
|
||||
# in
|
||||
# lib.mkIf config.mods.nextcloud.enable
|
||||
# (lib.optionalAttrs (options?systemd.user.startServices) #{
|
||||
# builtins.listToAttrs
|
||||
# (map
|
||||
# ({ name, remote, local }: {
|
||||
# systemd.user = {
|
||||
# services."${name}" = {
|
||||
# Unit = {
|
||||
# Description = "Auto sync Nextcloud";
|
||||
# After = "network-online.target";
|
||||
# };
|
||||
# Service = {
|
||||
# Type = "simple";
|
||||
# ExecStart = "${pkgs.nextcloud-client}/bin/nextcloudcmd -h --path ${remote} ${local} https://${username}:${password}@${url}";
|
||||
# TimeoutStopSec = "180";
|
||||
# KillMode = "process";
|
||||
# KillSignal = "SIGINT";
|
||||
# };
|
||||
# Install.WantedBy = [ "multi-user.target" ];
|
||||
# };
|
||||
# timers.${name} = {
|
||||
# Unit.Description = "Automatic sync files with Nextcloud when booted up after 1 minute then rerun every 60 minutes";
|
||||
# Timer.OnBootSec = "1min";
|
||||
# Timer.OnUnitActiveSec = "60min";
|
||||
# Install.WantedBy = [ "multi-user.target" "timers.target" ];
|
||||
# };
|
||||
# startServices = true;
|
||||
# };
|
||||
# # });
|
||||
# }))
|
||||
# synclist
|
||||
# );
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue