From 49d1e7b6b25675002be7a72765dcc69881f76dd9 Mon Sep 17 00:00:00 2001 From: John Bowdre Date: Fri, 20 Dec 2024 17:25:48 -0600 Subject: [PATCH] alacritty config/theming --- flake.lock | 105 ++++++++++++++++++++++++++++++--- flake.nix | 3 + home/modules/gui/alacritty.nix | 23 +++++++- overlays/default.nix | 2 + 4 files changed, 124 insertions(+), 9 deletions(-) diff --git a/flake.lock b/flake.lock index 5767395..82eadb0 100644 --- a/flake.lock +++ b/flake.lock @@ -1,5 +1,41 @@ { "nodes": { + "alacritty-theme": { + "inputs": { + "alacritty-theme": "alacritty-theme_2", + "flake-parts": "flake-parts", + "nixpkgs": "nixpkgs" + }, + "locked": { + "lastModified": 1733731622, + "narHash": "sha256-SSdVAmG5W+x97EgSMwfO9yIqkNkMZmfdVUI/zll6OYU=", + "owner": "alexghr", + "repo": "alacritty-theme.nix", + "rev": "0e69ef549d4672c9066264d448ea5ea8b214a4f9", + "type": "github" + }, + "original": { + "owner": "alexghr", + "repo": "alacritty-theme.nix", + "type": "github" + } + }, + "alacritty-theme_2": { + "flake": false, + "locked": { + "lastModified": 1733116860, + "narHash": "sha256-D37MQtNS20ESny5UhW1u6ELo9czP4l+q0S8neH7Wdbc=", + "owner": "alacritty", + "repo": "alacritty-theme", + "rev": "95a7d695605863ede5b7430eb80d9e80f5f504bc", + "type": "github" + }, + "original": { + "owner": "alacritty", + "repo": "alacritty-theme", + "type": "github" + } + }, "devshell": { "inputs": { "nixpkgs": [ @@ -59,6 +95,24 @@ } }, "flake-parts": { + "inputs": { + "nixpkgs-lib": "nixpkgs-lib" + }, + "locked": { + "lastModified": 1683560683, + "narHash": "sha256-XAygPMN5Xnk/W2c1aW0jyEa6lfMDZWlQgiNtmHXytPc=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "006c75898cf814ef9497252b022e91c946ba8e17", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "flake-parts", + "type": "github" + } + }, + "flake-parts_2": { "inputs": { "nixpkgs-lib": [ "nixvim", @@ -309,16 +363,34 @@ }, "nixpkgs": { "locked": { - "lastModified": 1734323986, - "narHash": "sha256-m/lh6hYMIWDYHCAsn81CDAiXoT3gmxXI9J987W5tZrE=", - "owner": "nixos", + "lastModified": 1703961334, + "narHash": "sha256-M1mV/Cq+pgjk0rt6VxoyyD+O8cOUiai8t9Q6Yyq4noY=", + "owner": "NixOS", "repo": "nixpkgs", - "rev": "394571358ce82dff7411395829aa6a3aad45b907", + "rev": "b0d36bd0a420ecee3bc916c91886caca87c894e9", "type": "github" }, "original": { - "owner": "nixos", - "ref": "nixos-24.11", + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs-lib": { + "locked": { + "dir": "lib", + "lastModified": 1682879489, + "narHash": "sha256-sASwo8gBt7JDnOOstnps90K1wxmVfyhsTPPNTGBPjjg=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "da45bf6ec7bbcc5d1e14d3795c025199f28e0de0", + "type": "github" + }, + "original": { + "dir": "lib", + "owner": "NixOS", + "ref": "nixos-unstable", "repo": "nixpkgs", "type": "github" } @@ -339,11 +411,27 @@ "type": "github" } }, + "nixpkgs_2": { + "locked": { + "lastModified": 1734323986, + "narHash": "sha256-m/lh6hYMIWDYHCAsn81CDAiXoT3gmxXI9J987W5tZrE=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "394571358ce82dff7411395829aa6a3aad45b907", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixos-24.11", + "repo": "nixpkgs", + "type": "github" + } + }, "nixvim": { "inputs": { "devshell": "devshell", "flake-compat": "flake-compat", - "flake-parts": "flake-parts", + "flake-parts": "flake-parts_2", "git-hooks": "git-hooks", "home-manager": "home-manager_2", "nix-darwin": "nix-darwin", @@ -393,11 +481,12 @@ }, "root": { "inputs": { + "alacritty-theme": "alacritty-theme", "firefox-addons": "firefox-addons", "hardware": "hardware", "home-manager": "home-manager", "nixgl": "nixgl", - "nixpkgs": "nixpkgs", + "nixpkgs": "nixpkgs_2", "nixpkgs-unstable": "nixpkgs-unstable", "nixvim": "nixvim" } diff --git a/flake.nix b/flake.nix index 57c26a6..ce535a2 100644 --- a/flake.nix +++ b/flake.nix @@ -38,6 +38,9 @@ url = "github:nix-community/nixGL"; inputs.nixpkgs.follows = "nixpkgs"; }; + + # alacritty-theme + alacritty-theme.url = "github:alexghr/alacritty-theme.nix"; }; outputs = { self, nixpkgs, home-manager, ... }@inputs: diff --git a/home/modules/gui/alacritty.nix b/home/modules/gui/alacritty.nix index dc3c2e2..c9c7461 100644 --- a/home/modules/gui/alacritty.nix +++ b/home/modules/gui/alacritty.nix @@ -1,8 +1,29 @@ { config, pkgs, ... }: { + + # home.packages = with pkgs; [ alacritty-theme ]; + programs.alacritty = { enable = true; package = (config.lib.nixGL.wrap pkgs.alacritty); - settings = { window = { startup_mode = "Maximized"; }; }; + settings = { + font = { + normal = { + family = "BerkeleyMono Nerd Font Mono"; + style = "Bold Italic"; + }; + }; + general.import = [ pkgs.alacritty-theme.tokyo_night_enhanced ]; + terminal = { shell.program = "${pkgs.fish}/bin/fish"; }; + window = { + decorations = "None"; + padding = { + x = 3; + y = 3; + }; + startup_mode = "Maximized"; + }; + }; }; + } diff --git a/overlays/default.nix b/overlays/default.nix index d4fff63..869d778 100644 --- a/overlays/default.nix +++ b/overlays/default.nix @@ -21,4 +21,6 @@ config.allowUnfree = true; }; }; + + alacritty-theme = inputs.alacritty-theme.overlays.default; }