Skip to content

Commit

Permalink
Moved alacritty config to home manager where we can set certain settings
Browse files Browse the repository at this point in the history
(such as x11 scale factor) based on the host options
  • Loading branch information
jwyuen committed Jul 11, 2024
1 parent 7450e65 commit 1757fae
Show file tree
Hide file tree
Showing 7 changed files with 60 additions and 47 deletions.
5 changes: 3 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@ zhistory
zcompdump
.sys
*cache*
dots/.config/mpd/state
dots/.config/mpd/sticker.sql
dots/config/mpd/state
dots/config/mpd/sticker.sql
dots/config/alacritty/alacritty.toml
44 changes: 0 additions & 44 deletions dots/config/alacritty/alacritty.toml

This file was deleted.

1 change: 1 addition & 0 deletions dots/config/alacritty/alacritty.toml
45 changes: 45 additions & 0 deletions nix-config/home/alacritty.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@

{ pkgs, config, lib, host, ... }:

let
palette = config.colorScheme.palette;
inherit (import ../hosts/${host}/options.nix) alacritty x11ScaleFactor;
in lib.mkIf (alacritty == true) {
programs.alacritty = {
enable = true;
settings = {
import = [
"~/.config/alacritty/rice-colors.toml"
"~/.config/alacritty/fonts.toml"
];
live_config_reload = true;
cursor = {
style = {
shape = "Beam";
blinking = "On";
};
blink_interval = 550;
unfocused_hollow = false;
thickness = 0.15;
};
env = {
WINIT_X11_SCALE_FACTOR = x11ScaleFactor;
};
selection = {
save_to_clipboard = true;
};
window = {
decorations = "none";
dynamic_title = true;
dynamic_padding = true;
padding.x = 5;
padding.y = 5;
opacity = 1;
};
scrolling = {
history = 10000;
multiplier = 3;
};
};
};
}
2 changes: 1 addition & 1 deletion nix-config/home/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
{
imports = [
# Enable &/ Configure Programs
# ./alacritty.nix
./alacritty.nix
# ./bash.nix
./betterlockscreen.nix
./firefox.nix
Expand Down
3 changes: 3 additions & 0 deletions nix-config/hosts/nix-deskstar/options.nix
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,9 @@ in {
# Enable SyncThing
syncthing = true;

# Xorg scaling
x11ScaleFactor = "1.0";

# Power profiles daemon
powerprofiles = false;

Expand Down
3 changes: 3 additions & 0 deletions nix-config/hosts/nix-lappy/options.nix
Original file line number Diff line number Diff line change
Expand Up @@ -77,11 +77,14 @@ in {
syncthing = true;

# Xorg scaling
x11ScaleFactor = "1.4";
xrandrScale = "0.8x0.8";

# Power profiles daemon
powerprofiles = true;

# Use lanzaboote for secureboot
secureboot = true;


}
4 changes: 4 additions & 0 deletions nix-config/hosts/nix-vm/options.nix
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ in {
printer = false;

# Program options

terminal = "alacritty"; # This sets the terminal that is used by the hyprland terminal keybinding
browser = "firefox";
distrobox = false;
Expand All @@ -78,6 +79,9 @@ in {
# Enable SyncThing
syncthing = true;

# Xorg scaling
x11ScaleFactor = "1.0";

# Power profiles daemon
powerprofiles = false;

Expand Down

0 comments on commit 1757fae

Please sign in to comment.