From 041fea8d3e6297f8c4ca379ca3291b91592faeea Mon Sep 17 00:00:00 2001 From: Sean Buckley Date: Tue, 7 Sep 2021 20:32:11 -0400 Subject: [PATCH] make alacritty option --- modules/alacritty.nix | 10 +++++++++- modules/desktop.nix | 2 ++ modules/i3/default.nix | 1 - 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/modules/alacritty.nix b/modules/alacritty.nix index ef9275a..727bbaf 100644 --- a/modules/alacritty.nix +++ b/modules/alacritty.nix @@ -1,6 +1,14 @@ { config, pkgs, lib, ... }: +let + cfg = config.sconfig.alacritty; +in { - config = { + options.sconfig.alacritty.enable = lib.mkEnableOption "Enable Alacritty"; + + config = lib.mkIf cfg.enable { + + environment.systemPackages = [ pkgs.alacritty ]; + programs.bash.interactiveShellInit = '' function _set_title() { printf "\033]0;%s@%s:%s\007" "''${USER}" "''${HOSTNAME%%.*}" "''${PWD/#$HOME/\~}" diff --git a/modules/desktop.nix b/modules/desktop.nix index 4a22770..6cb1154 100644 --- a/modules/desktop.nix +++ b/modules/desktop.nix @@ -9,6 +9,8 @@ in programs.ssh.startAgent = true; programs.ssh.agentPKCS11Whitelist = pkcslib; + sconfig.alacritty.enable = true; + nixpkgs.overlays = [ (self: super: { gnome = super.gnome // { diff --git a/modules/i3/default.nix b/modules/i3/default.nix index c754ec9..3db5717 100644 --- a/modules/i3/default.nix +++ b/modules/i3/default.nix @@ -68,7 +68,6 @@ in environment.systemPackages = with pkgs; [ unstable.i3status-rust # 21.11 version supports zfs ARC - alacritty brightnessctl numix-icon-theme yaru-theme