mirror of
https://github.com/LnL7/nix-darwin.git
synced 2024-12-14 11:57:34 +00:00
44 lines
811 B
Nix
44 lines
811 B
Nix
{ config, lib, pkgs, ... }:
|
|
|
|
with lib;
|
|
|
|
let
|
|
|
|
cfg = config.services.kwm;
|
|
|
|
in
|
|
|
|
{
|
|
options = {
|
|
services.kwm = {
|
|
|
|
enable = mkOption {
|
|
type = types.bool;
|
|
default = false;
|
|
description = "Whether to enable the khd window manager.";
|
|
};
|
|
|
|
package = mkOption {
|
|
type = types.path;
|
|
default = pkgs.kwm;
|
|
description = "This option specifies the kwm package to use";
|
|
};
|
|
|
|
};
|
|
};
|
|
|
|
config = mkIf cfg.enable {
|
|
|
|
launchd.user.agents.kwm = {
|
|
serviceConfig.Program = "${cfg.package}/kwm";
|
|
serviceConfig.KeepAlive = true;
|
|
serviceConfig.ProcessType = "Interactive";
|
|
serviceConfig.Sockets.Listeners =
|
|
{ SockServiceName = "3020";
|
|
SockType = "dgram";
|
|
SockFamily = "IPv4";
|
|
};
|
|
};
|
|
|
|
};
|
|
}
|