diff --git a/modules/default.nix b/modules/default.nix index 111525bc5..a3ecb41c7 100644 --- a/modules/default.nix +++ b/modules/default.nix @@ -34,6 +34,7 @@ let ./services/gpg-agent.nix ./services/keepassx.nix ./services/network-manager-applet.nix + ./services/owncloud-client.nix ./services/random-background.nix ./services/redshift.nix ./services/syncthing.nix diff --git a/modules/services/owncloud-client.nix b/modules/services/owncloud-client.nix new file mode 100644 index 000000000..e168ab111 --- /dev/null +++ b/modules/services/owncloud-client.nix @@ -0,0 +1,29 @@ +{ config, lib, pkgs, ... }: + +with lib; + +{ + options = { + services.owncloud-client = { + enable = mkEnableOption "Owncloud Client"; + }; + }; + + 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 = { + ExecStart = "${pkgs.owncloud-client}/bin/owncloud"; + }; + + Install = { + WantedBy = [ "graphical-session.target" ]; + }; + }; + }; +}