2018-11-23 10:43:13 +01:00
|
|
|
{ config, lib, pkgs, ... }:
|
|
|
|
|
|
|
|
with lib;
|
|
|
|
|
|
|
|
{
|
|
|
|
options = {
|
2020-02-02 00:39:17 +01:00
|
|
|
services.nextcloud-client = { enable = mkEnableOption "Nextcloud Client"; };
|
2018-11-23 10:43:13 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
config = mkIf config.services.nextcloud-client.enable {
|
|
|
|
systemd.user.services.nextcloud-client = {
|
|
|
|
Unit = {
|
|
|
|
Description = "Nextcloud Client";
|
|
|
|
After = [ "graphical-session-pre.target" ];
|
|
|
|
PartOf = [ "graphical-session.target" ];
|
|
|
|
};
|
|
|
|
|
|
|
|
Service = {
|
|
|
|
Environment = "PATH=${config.home.profileDirectory}/bin";
|
|
|
|
ExecStart = "${pkgs.nextcloud-client}/bin/nextcloud";
|
|
|
|
};
|
|
|
|
|
2020-02-02 00:39:17 +01:00
|
|
|
Install = { WantedBy = [ "graphical-session.target" ]; };
|
2018-11-23 10:43:13 +01:00
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|