1
0
Fork 0
mirror of https://github.com/nix-community/home-manager synced 2024-11-23 11:39:46 +01:00
home-manager/modules/services/owncloud-client.nix
Robert Helgesson dc1e9d1bc6
qt: add option qt.systemdServicePath
This option contains a string suitable as value for the PATH
environment variable in systemd services that run Qt 5 applications.

Qt applications need this special treatment because they use PATH to
locate plugins that sometimes are necessary for proper functioning.

For now the option is not visible in the manual since the default
value is expected to work in most, if not all, cases.
2018-06-03 17:32:57 +02:00

30 lines
663 B
Nix

{ 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 = {
Environment = "PATH=${config.qt.systemdServicePath}";
ExecStart = "${pkgs.owncloud-client}/bin/owncloud";
};
Install = {
WantedBy = [ "graphical-session.target" ];
};
};
};
}