about summary refs log tree commit diff
path: root/users/Profpatsch/alacritty.nix
diff options
context:
space:
mode:
Diffstat (limited to 'users/Profpatsch/alacritty.nix')
-rw-r--r--users/Profpatsch/alacritty.nix34
1 files changed, 34 insertions, 0 deletions
diff --git a/users/Profpatsch/alacritty.nix b/users/Profpatsch/alacritty.nix
new file mode 100644
index 000000000000..d2cb8de2fc86
--- /dev/null
+++ b/users/Profpatsch/alacritty.nix
@@ -0,0 +1,34 @@
+{ depot, pkgs, lib, ... }:
+
+let
+  bins = depot.nix.getBins pkgs.alacritty [ "alacritty" ];
+
+  config =
+    depot.users.Profpatsch.importDhall.importDhall {
+      root = ./.;
+      files = [
+        "alacritty.dhall"
+        "solarized.dhall"
+      ];
+      main = "alacritty.dhall";
+      deps = [ ];
+    };
+
+  config-file = lib.pipe config.alacritty-config [
+    (lib.generators.toYAML { })
+    (pkgs.writeText "alacritty.conf")
+  ];
+
+
+  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