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:
parent
20eccbba07
commit
49d6daa5b1
3 changed files with 46 additions and 0 deletions
|
@ -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
|
||||
|
|
|
@ -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
44
modules/services/kwm.nix
Normal 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";
|
||||
};
|
||||
};
|
||||
|
||||
};
|
||||
}
|
Loading…
Add table
Reference in a new issue