Modularize nextcloud and remove need for GUI application

This commit is contained in:
DashieTM 2024-08-04 03:48:07 +02:00
parent 8d35835f89
commit ee2b51bbc1
6 changed files with 74 additions and 47 deletions

View file

@ -1,6 +1,6 @@
{ config, lib, options, pkgs, ... }: {
imports = [
];
options.mods = {
@ -305,7 +305,8 @@
"ironbar"
"firefox"
"oxipaste_daemon"
"nextcloud --background"
# should be taken care of with the new systemd services
# "nextcloud --background"
"oxinoti"
] ++ config.mods.hyprland.extra_autostart;

View file

@ -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
# );
}