mirror of
https://github.com/nix-community/home-manager
synced 2024-11-27 05:29:46 +01: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
|
let
|
||||||
|
|
||||||
cfg = config.services.kdeconnect;
|
cfg = config.services.kdeconnect;
|
||||||
package = pkgs.plasma5Packages.kdeconnect-kde;
|
|
||||||
|
|
||||||
in {
|
in {
|
||||||
meta.maintainers = [ maintainers.adisbladis ];
|
meta.maintainers = [ maintainers.adisbladis ];
|
||||||
|
@ -13,6 +12,12 @@ in {
|
||||||
options = {
|
options = {
|
||||||
services.kdeconnect = {
|
services.kdeconnect = {
|
||||||
enable = mkEnableOption "KDE connect";
|
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 {
|
indicator = mkOption {
|
||||||
type = types.bool;
|
type = types.bool;
|
||||||
|
@ -25,7 +30,7 @@ in {
|
||||||
|
|
||||||
config = mkMerge [
|
config = mkMerge [
|
||||||
(mkIf cfg.enable {
|
(mkIf cfg.enable {
|
||||||
home.packages = [ package ];
|
home.packages = [ cfg.package ];
|
||||||
|
|
||||||
assertions = [
|
assertions = [
|
||||||
(hm.assertions.assertPlatform "services.kdeconnect" pkgs
|
(hm.assertions.assertPlatform "services.kdeconnect" pkgs
|
||||||
|
@ -44,7 +49,7 @@ in {
|
||||||
|
|
||||||
Service = {
|
Service = {
|
||||||
Environment = "PATH=${config.home.profileDirectory}/bin";
|
Environment = "PATH=${config.home.profileDirectory}/bin";
|
||||||
ExecStart = "${package}/libexec/kdeconnectd";
|
ExecStart = "${cfg.package}/libexec/kdeconnectd";
|
||||||
Restart = "on-abort";
|
Restart = "on-abort";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -72,7 +77,7 @@ in {
|
||||||
|
|
||||||
Service = {
|
Service = {
|
||||||
Environment = "PATH=${config.home.profileDirectory}/bin";
|
Environment = "PATH=${config.home.profileDirectory}/bin";
|
||||||
ExecStart = "${package}/bin/kdeconnect-indicator";
|
ExecStart = "${cfg.package}/bin/kdeconnect-indicator";
|
||||||
Restart = "on-abort";
|
Restart = "on-abort";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue