mirror of
https://github.com/nix-community/home-manager.git
synced 2024-12-14 11:57:55 +00:00
kdeconnect: add package option
This commit is contained in:
parent
7e91f2a0ba
commit
9de3aab091
1 changed files with 9 additions and 4 deletions
|
@ -5,7 +5,6 @@ with lib;
|
|||
let
|
||||
|
||||
cfg = config.services.kdeconnect;
|
||||
package = pkgs.plasma5Packages.kdeconnect-kde;
|
||||
|
||||
in {
|
||||
meta.maintainers = [ maintainers.adisbladis ];
|
||||
|
@ -13,6 +12,12 @@ in {
|
|||
options = {
|
||||
services.kdeconnect = {
|
||||
enable = mkEnableOption "KDE connect";
|
||||
package = mkOption {
|
||||
type = types.package;
|
||||
default = pkgs.plasma5Packages.kdeconnect-kde;
|
||||
example = literalExpression "pkgs.kdePackages.kdeconnect-kde";
|
||||
description = "The KDE connect package to use";
|
||||
};
|
||||
|
||||
indicator = mkOption {
|
||||
type = types.bool;
|
||||
|
@ -25,7 +30,7 @@ in {
|
|||
|
||||
config = mkMerge [
|
||||
(mkIf cfg.enable {
|
||||
home.packages = [ package ];
|
||||
home.packages = [ cfg.package ];
|
||||
|
||||
assertions = [
|
||||
(hm.assertions.assertPlatform "services.kdeconnect" pkgs
|
||||
|
@ -44,7 +49,7 @@ in {
|
|||
|
||||
Service = {
|
||||
Environment = "PATH=${config.home.profileDirectory}/bin";
|
||||
ExecStart = "${package}/libexec/kdeconnectd";
|
||||
ExecStart = "${cfg.package}/libexec/kdeconnectd";
|
||||
Restart = "on-abort";
|
||||
};
|
||||
};
|
||||
|
@ -72,7 +77,7 @@ in {
|
|||
|
||||
Service = {
|
||||
Environment = "PATH=${config.home.profileDirectory}/bin";
|
||||
ExecStart = "${package}/bin/kdeconnect-indicator";
|
||||
ExecStart = "${cfg.package}/bin/kdeconnect-indicator";
|
||||
Restart = "on-abort";
|
||||
};
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue