diff options
Diffstat (limited to 'users/Profpatsch/alacritty.nix')
-rw-r--r-- | users/Profpatsch/alacritty.nix | 23 |
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 |