mirror of
https://github.com/LnL7/nix-darwin.git
synced 2025-03-16 13:28:16 +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 = {
|
options = {
|
||||||
services.khd = {
|
services.khd.enable = mkOption {
|
||||||
|
type = types.bool;
|
||||||
enable = mkOption {
|
default = false;
|
||||||
type = types.bool;
|
description = "Whether to enable the khd hototkey daemon.";
|
||||||
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.package = mkOption {
|
||||||
|
type = types.package;
|
||||||
|
example = literalExample "pkgs.khd";
|
||||||
|
description = "This option specifies the khd package to use.";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
|
|
||||||
|
services.khd.package = mkDefault pkgs.khd;
|
||||||
|
|
||||||
launchd.user.agents.khd = {
|
launchd.user.agents.khd = {
|
||||||
path = [ cfg.package pkgs.kwm config.environment.systemPath ];
|
path = [ cfg.package pkgs.kwm config.environment.systemPath ];
|
||||||
serviceConfig.Program = "${cfg.package}/bin/khd";
|
serviceConfig.Program = "${cfg.package}/bin/khd";
|
||||||
|
|
Loading…
Add table
Reference in a new issue