mirror of
https://github.com/LnL7/nix-darwin.git
synced 2024-12-14 11:57:34 +00:00
khd: move package default to config
This commit is contained in:
parent
1d5c5266bb
commit
6430ca5e86
1 changed files with 11 additions and 14 deletions
|
@ -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";
|
||||
|
|
Loading…
Reference in a new issue