1
0
Fork 0
mirror of https://github.com/nix-community/home-manager synced 2024-12-25 03:09:47 +01:00
home-manager/modules/services/owncloud-client.nix
2023-02-07 21:54:24 +01:00

31 lines
763 B
Nix

{ config, lib, pkgs, ... }:
with lib;
{
options = {
services.owncloud-client = { enable = mkEnableOption "Owncloud Client"; };
};
config = mkIf config.services.owncloud-client.enable {
assertions = [
(hm.assertions.assertPlatform "services.owncloud-client" pkgs
platforms.linux)
];
systemd.user.services.owncloud-client = {
Unit = {
Description = "Owncloud Client";
After = [ "graphical-session-pre.target" ];
PartOf = [ "graphical-session.target" ];
};
Service = {
Environment = "PATH=${config.home.profileDirectory}/bin";
ExecStart = "${pkgs.owncloud-client}/bin/owncloud";
};
Install = { WantedBy = [ "graphical-session.target" ]; };
};
};
}