Skip to content

Commit

Permalink
Add minimum kitty config
Browse files Browse the repository at this point in the history
  • Loading branch information
kachick committed Oct 1, 2024
1 parent 984d7d4 commit a672281
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 19 deletions.
23 changes: 4 additions & 19 deletions home-manager/common.nix
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
./ssh.nix
./git.nix
./editors.nix
./terminals.nix
./fzf.nix
./firefox.nix
./linux.nix
Expand Down Expand Up @@ -116,25 +117,6 @@
# Use same nixpkgs channel as same as fzf
};

# https://nixos.wiki/wiki/Home_Manager
# - Prefer XDG_*
# - If can't write the reason as a comment

# Do not alias *.nix into `xdg.configFile`, it actually cannot be used because of using many relative dirs
# So you should call `home-manager switch` with `-f ~/repos/dotfiles/USER_NAME.nix`

xdg.configFile."alacritty/alacritty.toml".source = ../config/alacritty/alacritty-unix.toml;
xdg.configFile."alacritty/unix.toml".source =
if pkgs.stdenv.isDarwin then ../config/alacritty/macos.toml else ../config/alacritty/linux.toml;
xdg.configFile."alacritty/common.toml".source = ../config/alacritty/common.toml;
xdg.configFile."alacritty/themes" = {
source = ../config/alacritty/themes;
recursive = true;
};

# Not under "starship/starship.toml"
xdg.configFile."starship.toml".source = ../config/starship/starship.toml;

# No home-manager module exists https://github.com/nix-community/home-manager/issues/2890
# TODO: Automate that needs to call `Install-Module -Name PSFzfHistory` first
xdg.configFile."powershell/Microsoft.PowerShell_profile.ps1".source = ../config/powershell/Profile.ps1;
Expand Down Expand Up @@ -173,6 +155,9 @@
enable = true;
};

# Not under "starship/starship.toml"
xdg.configFile."starship.toml".source = ../config/starship/starship.toml;

# https://github.com/nix-community/home-manager/blob/release-24.05/modules/programs/yazi.nix
# TODO: Use shell integrations for `y` after release-24.11. 24.05 is using fixed old `ya`
programs.yazi = {
Expand Down
38 changes: 38 additions & 0 deletions home-manager/terminals.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{ pkgs, lib, ... }:

{
xdg = {
configFile = {
"alacritty/alacritty.toml".source = ../config/alacritty/alacritty-unix.toml;
"alacritty/unix.toml".source =
if pkgs.stdenv.isDarwin then ../config/alacritty/macos.toml else ../config/alacritty/linux.toml;
"alacritty/common.toml".source = ../config/alacritty/common.toml;
"alacritty/themes" = {
source = ../config/alacritty/themes;
recursive = true;
};
};
};

# https://github.com/nix-community/home-manager/blob/release-24.05/modules/programs/kitty.nix
programs.kitty = {
enable = true;
theme = "zenwritten_dark";
settings = {
shell = lib.getExe pkgs.zsh;
cursor_shape = "beam";
cursor_blink_interval = 0;
copy_on_select = "clipboard";
tab_bar_edge = "top";
# tab_bar_style = "separator";
# tab_separator = " | ";
tab_bar_style = "slant";
};

# Avoiding a home-manager definition bug for rejecting all float.
# https://github.com/nix-community/home-manager/issues/4850
extraConfig = ''
background_opacity 0.85
'';
};
}

0 comments on commit a672281

Please sign in to comment.