WIP splitting up configuration.nix into modules
This commit is contained in:
parent
05a553251f
commit
835faf218d
8 changed files with 160 additions and 98 deletions
30
modules/home-manager/nextcloud.nix
Normal file
30
modules/home-manager/nextcloud.nix
Normal file
|
@ -0,0 +1,30 @@
|
|||
{ ... }:
|
||||
{
|
||||
home.file.".netrc".text = ''
|
||||
login root
|
||||
password KaasIsAwesome!
|
||||
'';
|
||||
|
||||
systemd.user = {
|
||||
services.nextcloud-autosync = {
|
||||
Unit = {
|
||||
Description = "Automatic nextcloud sync";
|
||||
After = "network-online.target";
|
||||
};
|
||||
Service = {
|
||||
Type = "simple";
|
||||
ExecStart = "${pkgs.nextcloud-client}/bin/nextcloudcmd -h -n --path /var/music /home/chris/Music https://cloud.kruining.eu";
|
||||
TimeoutStopSec = "180";
|
||||
KillMode = "process";
|
||||
KillSignal = "SIGINT";
|
||||
};
|
||||
Install.WantedBy = [ "multi-user.target" ];
|
||||
};
|
||||
timers.nextcloud-autosync = {
|
||||
Unit.Description = "Automatic nextcloud sync";
|
||||
Timer.OnBootSec = "5min";
|
||||
Timer.OnUnitActiveSec = "60min";
|
||||
Install.WantedBy = [ "multi-user.target" "timers.target" ];
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue