From c4372a127596d85157aae4592aca0935b5053fcc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9-Patrick=20Bubel?= Date: Sat, 20 Jan 2018 11:26:32 +0100 Subject: [PATCH] qsyncthingtray: add module --- modules/misc/news.nix | 8 ++++++++ modules/modules.nix | 1 + modules/services/qsyncthingtray.nix | 29 +++++++++++++++++++++++++++++ 3 files changed, 38 insertions(+) create mode 100644 modules/services/qsyncthingtray.nix diff --git a/modules/misc/news.nix b/modules/misc/news.nix index 5c11803e..b7581f0b 100644 --- a/modules/misc/news.nix +++ b/modules/misc/news.nix @@ -531,6 +531,14 @@ in ${opts.${config.home.sessionVariableSetter}} ''; + + } + + { + time = "2018-01-20T10:36:12+00:00"; + message = '' + A new module is available: 'services.qsyncthingtray' + ''; } ]; }; diff --git a/modules/modules.nix b/modules/modules.nix index 7fd76147..0bc2e7bf 100644 --- a/modules/modules.nix +++ b/modules/modules.nix @@ -56,6 +56,7 @@ let ./services/random-background.nix ./services/redshift.nix ./services/screen-locker.nix + ./services/qsyncthingtray.nix ./services/syncthing.nix ./services/taffybar.nix ./services/tahoe-lafs.nix diff --git a/modules/services/qsyncthingtray.nix b/modules/services/qsyncthingtray.nix new file mode 100644 index 00000000..fb9dc287 --- /dev/null +++ b/modules/services/qsyncthingtray.nix @@ -0,0 +1,29 @@ +{ config, lib, pkgs, ... }: + +with lib; + +{ + options = { + services.qsyncthingtray = { + enable = mkEnableOption "QSyncthingTray"; + }; + }; + + config = mkIf config.services.qsyncthingtray.enable { + systemd.user.services.qsyncthingtray = { + Unit = { + Description = "QSyncthingTray"; + After = [ "graphical-session-pre.target" ]; + PartOf = [ "graphical-session.target" ]; + }; + + Install = { + WantedBy = [ "graphical-session.target" ]; + }; + + Service = { + ExecStart = "${pkgs.qsyncthingtray}/bin/QSyncthingTray"; + }; + }; + }; +}