diff options
| author | Daiderd Jordan <daiderd@gmail.com> | 2017-01-29 21:01:47 +0100 |
|---|---|---|
| committer | Daiderd Jordan <daiderd@gmail.com> | 2017-01-29 21:01:47 +0100 |
| commit | 49d6daa5b1acba2c9987cac10fe0eac03b068c73 (patch) | |
| tree | 2ec5ecf5a2549129b77f7028202dfaa3cd05b376 | |
| parent | 20eccbba07dc6d31430c6b57ea031ada9da9a0a8 (diff) | |
kwm: add service module
| -rw-r--r-- | default.nix | 1 | ||||
| -rw-r--r-- | modules/examples/lnl.nix | 1 | ||||
| -rw-r--r-- | modules/services/kwm.nix | 44 |
3 files changed, 46 insertions, 0 deletions
diff --git a/default.nix b/default.nix index 8e7e3a4..76d0c49 100644 --- a/default.nix +++ b/default.nix @@ -37,6 +37,7 @@ let ./modules/launchd ./modules/services/activate-system.nix ./modules/services/khd.nix + ./modules/services/kwm.nix ./modules/services/nix-daemon.nix ./modules/programs/bash.nix ./modules/programs/nix-script.nix diff --git a/modules/examples/lnl.nix b/modules/examples/lnl.nix index 252e066..c373d03 100644 --- a/modules/examples/lnl.nix +++ b/modules/examples/lnl.nix @@ -37,6 +37,7 @@ environment.extraOutputsToInstall = [ "man" ]; services.khd.enable = true; + services.kwm.enable = true; launchd.user.agents.fetch-nixpkgs = { command = "${pkgs.git}/bin/git -C ~/.nix-defexpr/nixpkgs fetch origin master"; diff --git a/modules/services/kwm.nix b/modules/services/kwm.nix new file mode 100644 index 0000000..dc316ea --- /dev/null +++ b/modules/services/kwm.nix @@ -0,0 +1,44 @@ +{ 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"; + }; + }; + + }; +} |
