2017-08-26 16:00:55 +02:00
|
|
|
{ config, lib, pkgs, ... }:
|
|
|
|
|
|
|
|
with lib;
|
|
|
|
|
|
|
|
{
|
|
|
|
options = {
|
2020-02-02 00:39:17 +01:00
|
|
|
services.owncloud-client = { enable = mkEnableOption "Owncloud Client"; };
|
2017-08-26 16:00:55 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
config = mkIf config.services.owncloud-client.enable {
|
|
|
|
systemd.user.services.owncloud-client = {
|
|
|
|
Unit = {
|
|
|
|
Description = "Owncloud Client";
|
|
|
|
After = [ "graphical-session-pre.target" ];
|
|
|
|
PartOf = [ "graphical-session.target" ];
|
|
|
|
};
|
|
|
|
|
|
|
|
Service = {
|
2018-07-29 18:15:50 +02:00
|
|
|
Environment = "PATH=${config.home.profileDirectory}/bin";
|
2017-08-26 16:00:55 +02:00
|
|
|
ExecStart = "${pkgs.owncloud-client}/bin/owncloud";
|
|
|
|
};
|
|
|
|
|
2020-02-02 00:39:17 +01:00
|
|
|
Install = { WantedBy = [ "graphical-session.target" ]; };
|
2017-08-26 16:00:55 +02:00
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|