1
0
Fork 0
mirror of https://github.com/LnL7/nix-darwin.git synced 2025-03-28 02:37:09 +00:00

kwm: add service module

This commit is contained in:
Daiderd Jordan 2017-01-29 21:01:47 +01:00
parent 20eccbba07
commit 49d6daa5b1
No known key found for this signature in database
GPG key ID: D02435D05B810C96
3 changed files with 46 additions and 0 deletions

View file

@ -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

View file

@ -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";

44
modules/services/kwm.nix Normal file
View file

@ -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";
};
};
};
}