From 3bcd9d747b102b825bdf218245652eb763045d6c Mon Sep 17 00:00:00 2001 From: Nikita Uvarov Date: Sat, 26 Aug 2017 16:00:55 +0200 Subject: [PATCH] owncloud-client: add module --- modules/default.nix | 1 + modules/services/owncloud-client.nix | 29 ++++++++++++++++++++++++++++ 2 files changed, 30 insertions(+) create mode 100644 modules/services/owncloud-client.nix diff --git a/modules/default.nix b/modules/default.nix index 111525bc..a3ecb41c 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 00000000..e168ab11 --- /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" ]; + }; + }; + }; +}