From 6430ca5e8655863b20368ae6fcc4765b8c53f3c4 Mon Sep 17 00:00:00 2001 From: Daiderd Jordan Date: Sun, 14 May 2017 14:27:38 +0200 Subject: [PATCH] khd: move package default to config --- modules/services/khd.nix | 25 +++++++++++-------------- 1 file changed, 11 insertions(+), 14 deletions(-) diff --git a/modules/services/khd.nix b/modules/services/khd.nix index f3087361..23c40f0c 100644 --- a/modules/services/khd.nix +++ b/modules/services/khd.nix @@ -10,26 +10,23 @@ 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; - defaultText = "pkgs.khd"; - description = "This option specifies the khd package to use."; - }; + services.khd.enable = mkOption { + type = types.bool; + default = false; + description = "Whether to enable the khd hototkey daemon."; + }; + services.khd.package = mkOption { + type = types.package; + example = literalExample "pkgs.khd"; + description = "This option specifies the khd package to use."; }; }; config = mkIf cfg.enable { + services.khd.package = mkDefault pkgs.khd; + launchd.user.agents.khd = { path = [ cfg.package pkgs.kwm config.environment.systemPath ]; serviceConfig.Program = "${cfg.package}/bin/khd";