mirror of
https://github.com/nix-community/home-manager
synced 2024-11-16 16:19:44 +01:00
39 lines
919 B
Nix
39 lines
919 B
Nix
{ config, lib, pkgs, ... }:
|
|
|
|
with lib;
|
|
|
|
let
|
|
|
|
cfg = config.services.nextcloud-client;
|
|
|
|
in {
|
|
options = {
|
|
services.nextcloud-client = {
|
|
enable = mkEnableOption "Nextcloud Client";
|
|
|
|
package = mkOption {
|
|
type = types.package;
|
|
default = pkgs.nextcloud-client;
|
|
defaultText = literalExample "pkgs.nextcloud-client";
|
|
description = "The package to use for the nextcloud client binary.";
|
|
};
|
|
};
|
|
};
|
|
|
|
config = mkIf cfg.enable {
|
|
systemd.user.services.nextcloud-client = {
|
|
Unit = {
|
|
Description = "Nextcloud Client";
|
|
After = [ "graphical-session-pre.target" ];
|
|
PartOf = [ "graphical-session.target" ];
|
|
};
|
|
|
|
Service = {
|
|
Environment = "PATH=${config.home.profileDirectory}/bin";
|
|
ExecStart = "${cfg.package}/bin/nextcloud";
|
|
};
|
|
|
|
Install = { WantedBy = [ "graphical-session.target" ]; };
|
|
};
|
|
};
|
|
}
|