summaryrefslogtreecommitdiff
path: root/modules/services
diff options
context:
space:
mode:
authorDaiderd Jordan <daiderd@gmail.com>2017-01-25 22:50:12 +0100
committerDaiderd Jordan <daiderd@gmail.com>2017-01-25 22:50:12 +0100
commit0eb8384f0a8ed662c60934b7fa44f39d1b97fa7a (patch)
tree35fa3b3dce265dbf07226817ce4afeaa4a7668c6 /modules/services
parenta70795944fc7201ba91e68f0e62857454991c542 (diff)
fix khd service
Diffstat (limited to 'modules/services')
-rw-r--r--modules/services/khd.nix44
1 files changed, 44 insertions, 0 deletions
diff --git a/modules/services/khd.nix b/modules/services/khd.nix
new file mode 100644
index 0000000..85cef82
--- /dev/null
+++ b/modules/services/khd.nix
@@ -0,0 +1,44 @@
+{ config, lib, pkgs, ... }:
+
+with lib;
+
+let
+
+ cfg = config.services.khd;
+
+in
+
+{
+ options = {
+ services.khd = {
+
+ enable = mkOption {
+ type = types.bool;
+ default = false;
+ description = "Whether to enable the khd hototkey daemon.";
+ };
+
+ package = mkOption {
+ type = types.path;
+ default = pkgs.khd;
+ description = "This option specifies the khd package to use";
+ };
+
+ };
+ };
+
+ config = mkIf cfg.enable {
+
+ launchd.user.agents.khd = {
+ serviceConfig.Program = "${cfg.package}/bin/khd";
+ serviceConfig.KeepAlive = true;
+ serviceConfig.ProcessType = "Interactive";
+ serviceConfig.Sockets.Listeners =
+ { SockServiceName = "3021";
+ SockType = "dgram";
+ SockFamily = "IPv4";
+ };
+ };
+
+ };
+}