mirror of
https://github.com/nix-community/home-manager
synced 2024-12-26 03:39:47 +01:00
68ea28d330
Specifically, use pkgs.kdeconnect instead of pkgs.plasma5Packages.kdeconnect-kde. Closes #3274 Signed-off-by: Sumner Evans <me@sumnerevans.com>
72 lines
1.7 KiB
Nix
72 lines
1.7 KiB
Nix
{ config, lib, pkgs, ... }:
|
|
|
|
with lib;
|
|
|
|
let
|
|
|
|
cfg = config.services.kdeconnect;
|
|
package = pkgs.plasma5Packages.kdeconnect-kde;
|
|
|
|
in {
|
|
meta.maintainers = [ maintainers.adisbladis ];
|
|
|
|
options = {
|
|
services.kdeconnect = {
|
|
enable = mkEnableOption "KDE connect";
|
|
|
|
indicator = mkOption {
|
|
type = types.bool;
|
|
default = false;
|
|
description = "Whether to enable kdeconnect-indicator service.";
|
|
};
|
|
|
|
};
|
|
};
|
|
|
|
config = mkMerge [
|
|
(mkIf cfg.enable {
|
|
home.packages = [ package ];
|
|
|
|
systemd.user.services.kdeconnect = {
|
|
Unit = {
|
|
Description =
|
|
"Adds communication between your desktop and your smartphone";
|
|
After = [ "graphical-session-pre.target" ];
|
|
PartOf = [ "graphical-session.target" ];
|
|
};
|
|
|
|
Install = { WantedBy = [ "graphical-session.target" ]; };
|
|
|
|
Service = {
|
|
Environment = "PATH=${config.home.profileDirectory}/bin";
|
|
ExecStart = "${package}/libexec/kdeconnectd";
|
|
Restart = "on-abort";
|
|
};
|
|
};
|
|
})
|
|
|
|
(mkIf cfg.indicator {
|
|
systemd.user.services.kdeconnect-indicator = {
|
|
Unit = {
|
|
Description = "kdeconnect-indicator";
|
|
After = [
|
|
"graphical-session-pre.target"
|
|
"polybar.service"
|
|
"taffybar.service"
|
|
"stalonetray.service"
|
|
];
|
|
PartOf = [ "graphical-session.target" ];
|
|
};
|
|
|
|
Install = { WantedBy = [ "graphical-session.target" ]; };
|
|
|
|
Service = {
|
|
Environment = "PATH=${config.home.profileDirectory}/bin";
|
|
ExecStart = "${package}/bin/kdeconnect-indicator";
|
|
Restart = "on-abort";
|
|
};
|
|
};
|
|
})
|
|
|
|
];
|
|
}
|