diff options
| author | Daiderd Jordan <daiderd@gmail.com> | 2018-01-04 21:36:22 +0100 |
|---|---|---|
| committer | Daiderd Jordan <daiderd@gmail.com> | 2018-01-04 21:37:13 +0100 |
| commit | 1779e06cd4ba51adbbe898f1bf9f891c4bd9882e (patch) | |
| tree | 91718884ddbd4364ff03eabc607ffaad17fc3e90 /modules | |
| parent | 02a11717a4f8e6775da8e19f11371e96d931d051 (diff) | |
chunkwm: make chunkwmrc executable
Diffstat (limited to 'modules')
| -rw-r--r-- | modules/services/chunkwm.nix | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/modules/services/chunkwm.nix b/modules/services/chunkwm.nix index 27c6797..fd835c7 100644 --- a/modules/services/chunkwm.nix +++ b/modules/services/chunkwm.nix @@ -112,14 +112,16 @@ in { security.accessibilityPrograms = [ "${cfg.package}/bin/chunkwm" ]; - environment.etc."chunkwmrc".text = '' - #!/bin/bash - chunkc core::plugin_dir ${toString cfg.plugins.dir} - chunkc core::hotload ${if cfg.hotload then "1" else "0"} - '' - + concatMapStringsSep "\n" (p: "# Config for chunkwm-${p} plugin\n"+cfg.plugins.${p}.config or "# Nothing to configure") cfg.plugins.list - + concatMapStringsSep "\n" (p: "chunkc core::load "+p+".so") cfg.plugins.list - + "\n" + cfg.extraConfig; + environment.etc."chunkwmrc".source = pkgs.writeScript "etc-chunkwmrc" ( + '' + #!/bin/bash + chunkc core::plugin_dir ${toString cfg.plugins.dir} + chunkc core::hotload ${if cfg.hotload then "1" else "0"} + '' + + concatMapStringsSep "\n" (p: "# Config for chunkwm-${p} plugin\n"+cfg.plugins.${p}.config or "# Nothing to configure") cfg.plugins.list + + concatMapStringsSep "\n" (p: "chunkc core::load "+p+".so") cfg.plugins.list + + "\n" + cfg.extraConfig + ); launchd.user.agents.chunkwm = { path = [ cfg.package config.environment.systemPath ]; |
