From 2b6447df5e4e0b8654a089c27e33dffc425649c8 Mon Sep 17 00:00:00 2001 From: Daiderd Jordan Date: Fri, 24 Aug 2018 23:55:38 +0200 Subject: [PATCH] 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 --- modules/services/chunkwm.nix | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/modules/services/chunkwm.nix b/modules/services/chunkwm.nix index fd835c7a..21fa080c 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;