From 253dc6d4cf7cfd84e1ff2a0c24c813036f94306b Mon Sep 17 00:00:00 2001 From: Sean Buckley Date: Tue, 2 Nov 2021 17:33:58 -0400 Subject: [PATCH] alacritty: make configs work under plasma --- modules/alacritty.nix | 28 ++++++++++++++++++---------- 1 file changed, 18 insertions(+), 10 deletions(-) diff --git a/modules/alacritty.nix b/modules/alacritty.nix index 727bbaf..43dea59 100644 --- a/modules/alacritty.nix +++ b/modules/alacritty.nix @@ -7,7 +7,22 @@ in config = lib.mkIf cfg.enable { - environment.systemPackages = [ pkgs.alacritty ]; + environment.systemPackages = [ + pkgs.alacritty + (pkgs.writeTextFile { + name = "alacritty.yml"; + destination = "/etc/xdg/alacritty.yml"; + text = '' + env: + TERM: xterm-256color + key_bindings: + - { key: N, mods: Control|Shift, action: SpawnNewInstance } + - { key: T, mods: Control|Shift, action: SpawnNewInstance } + - { key: PageUp, mods: Shift, action: ScrollHalfPageUp } + - { key: PageDown, mods: Shift, action: ScrollHalfPageDown } + ''; + }) + ]; programs.bash.interactiveShellInit = '' function _set_title() { @@ -16,15 +31,8 @@ in [ -z "$VTE_VERSION" ] && PROMPT_COMMAND="_set_title; $PROMPT_COMMAND" ''; - environment.etc."xdg/alacritty.yml".text = '' - env: - TERM: xterm-256color - key_bindings: - - { key: N, mods: Control|Shift, action: SpawnNewInstance } - - { key: T, mods: Control|Shift, action: SpawnNewInstance } - - { key: PageUp, mods: Shift, action: ScrollHalfPageUp } - - { key: PageDown, mods: Shift, action: ScrollHalfPageDown } - ''; + environment.etc."xdg/alacritty.yml".source = + "/run/current-system/sw/etc/xdg/alacritty.yml"; }; }