about summary refs log tree commit diff
path: root/users/Profpatsch/alacritty.nix
diff options
context:
space:
mode:
authorProfpatsch <mail@profpatsch.de>2022-04-19T13·08+0200
committerProfpatsch <mail@profpatsch.de>2022-04-20T15·12+0000
commitea871fdcd754828c6d47dfd199a0d9b702d33f19 (patch)
tree023669ad7bff1a1733651bbbe1fc4399bf55455c /users/Profpatsch/alacritty.nix
parent70779f4e651784165449479a70465b9dded41d28 (diff)
feat(users/Profpatsch/alacritty): Some more configuration r/3980
Change-Id: Ibb2e1892327bd1f27a16dcde1424b8d55c7783d2
Reviewed-on: https://cl.tvl.fyi/c/depot/+/5479
Tested-by: BuildkiteCI
Reviewed-by: Profpatsch <mail@profpatsch.de>
Diffstat (limited to 'users/Profpatsch/alacritty.nix')
-rw-r--r--users/Profpatsch/alacritty.nix23
1 files changed, 14 insertions, 9 deletions
diff --git a/users/Profpatsch/alacritty.nix b/users/Profpatsch/alacritty.nix
index 56229c94848b..d2cb8de2fc86 100644
--- a/users/Profpatsch/alacritty.nix
+++ b/users/Profpatsch/alacritty.nix
@@ -3,8 +3,8 @@
 let
   bins = depot.nix.getBins pkgs.alacritty [ "alacritty" ];
 
-  config = lib.pipe { } [
-    (_: depot.users.Profpatsch.importDhall.importDhall {
+  config =
+    depot.users.Profpatsch.importDhall.importDhall {
       root = ./.;
       files = [
         "alacritty.dhall"
@@ -12,18 +12,23 @@ let
       ];
       main = "alacritty.dhall";
       deps = [ ];
-    })
+    };
+
+  config-file = lib.pipe config.alacritty-config [
     (lib.generators.toYAML { })
     (pkgs.writeText "alacritty.conf")
   ];
 
 
-  alacritty = depot.nix.writeExecline "alacritty" { } [
-    bins.alacritty
-    "--config-file"
-    config
-    "$@"
-  ];
+  alacritty = depot.nix.writeExecline "alacritty" { } (
+    (lib.concatLists (lib.mapAttrsToList (k: v: [ "export" k (toString v) ]) config.alacritty-env))
+    ++ [
+      bins.alacritty
+      "--config-file"
+      config-file
+      "$@"
+    ]
+  );
 
 in
 alacritty