summaryrefslogtreecommitdiff
path: root/modules/services/chunkwm.nix
diff options
context:
space:
mode:
authorDaiderd Jordan <daiderd@gmail.com>2018-08-24 23:55:38 +0200
committerDaiderd Jordan <daiderd@gmail.com>2018-08-24 23:55:38 +0200
commit2b6447df5e4e0b8654a089c27e33dffc425649c8 (patch)
tree8df21abfb2d523e6ebc53612d6251757eaced7d4 /modules/services/chunkwm.nix
parent90c34df929df878429eeca090a19201a21cc95bd (diff)
chunkwm: support multiple outputs
Since the package contains both chunkwm (daemon) and chunc (client) the daemon shouldn't really be in PATH by default. Usually libexec is used for this, however this would break the current expression used by people. This enables moving chunkc to a bin output for this purpose. eg. https://github.com/LnL7/dotfiles/commit/7ad4b4d23d029bb36213171df6447ca0838e2226
Diffstat (limited to 'modules/services/chunkwm.nix')
-rw-r--r--modules/services/chunkwm.nix14
1 files changed, 5 insertions, 9 deletions
diff --git a/modules/services/chunkwm.nix b/modules/services/chunkwm.nix
index fd835c7..21fa080 100644
--- a/modules/services/chunkwm.nix
+++ b/modules/services/chunkwm.nix
@@ -4,12 +4,10 @@ with lib;
let
cfg = config.services.chunkwm;
- plugins = [
- "border"
- "ffm"
- "tiling"
- ];
-in {
+ plugins = [ "border" "ffm" "tiling" ];
+in
+
+{
options = {
services.chunkwm.enable = mkOption {
type = types.bool;
@@ -110,8 +108,6 @@ in {
chunkc set window_region_locked 1
'';
- security.accessibilityPrograms = [ "${cfg.package}/bin/chunkwm" ];
-
environment.etc."chunkwmrc".source = pkgs.writeScript "etc-chunkwmrc" (
''
#!/bin/bash
@@ -125,7 +121,7 @@ in {
launchd.user.agents.chunkwm = {
path = [ cfg.package config.environment.systemPath ];
- serviceConfig.ProgramArguments = [ "${cfg.package}/bin/chunkwm" ]
+ serviceConfig.ProgramArguments = [ "${getOutput "out" cfg.package}/bin/chunkwm" ]
++ [ "-c" "/etc/chunkwmrc" ];
serviceConfig.RunAtLoad = true;
serviceConfig.KeepAlive = true;