From de25b23c9172cc604598fdcf25eed8d8fc3e259c Mon Sep 17 00:00:00 2001 From: ChUrl Date: Fri, 1 Jul 2022 18:42:37 +0200 Subject: [PATCH] Add emacs fonts + vterm --- home/home.nix | 3 +++ home/modules/emacs.nix | 26 ++++++++++++++++---------- 2 files changed, 19 insertions(+), 10 deletions(-) diff --git a/home/home.nix b/home/home.nix index b44e85a2..a138b9bf 100644 --- a/home/home.nix +++ b/home/home.nix @@ -32,6 +32,9 @@ rec { i18n.inputMethod.enabled = "fcitx5"; i18n.inputMethod.fcitx5.addons = with pkgs; [ fcitx5-gtk libsForQt5.fcitx5-qt fcitx5-chinese-addons fcitx5-configtool ]; + # Make fonts installed through packages available to applications + fonts.fontconfig.enable = true; + home = { username = "christoph"; homeDirectory = "/home/${home.username}"; diff --git a/home/modules/emacs.nix b/home/modules/emacs.nix index f9d93b4a..a86389a4 100644 --- a/home/modules/emacs.nix +++ b/home/modules/emacs.nix @@ -35,12 +35,17 @@ in { config = mkIf cfg.enable { # What home packages should be enabled home.packages = with pkgs; [ + ((emacsPackagesFor emacsPgtkNativeComp).emacsWithPackages (epkgs: [ + epkgs.vterm + ])) + binutils zstd (ripgrep.override { withPCRE2 = true; }) fd # libgccjit sqlite + # TODO: I probably need python too python310Packages.pygments inkscape graphviz @@ -49,20 +54,21 @@ in { nixfmt shellcheck maim + # TODO: Use LaTeX module instead + texlive.combined.scheme-medium + emacs-all-the-icons-fonts ]; - programs.emacs = { - package = pkgs.emacsPgtkNativeComp; - enable = true; - }; + # Do this in packages + # programs.emacs = { + # package = pkgs.emacsPgtkNativeComp; + # enable = true; + # }; home.sessionPath = [ - "/home/${config.home.username}/.emacs/bin" + "/home/${config.home.username}/.emacs.d/bin" ]; - # TODO: - # fonts.fonts = [ pkgs.emacs-all-the-icons-fonts ]; - # We tell HomeManager where the config files belong home.file = { # With onChange you even could rebuild doom emacs when rebuilding HomeManager but I don't want this to become too slow @@ -79,8 +85,8 @@ in { # Because we write to the filesystem, this script has to be run after HomeManager's writeBoundary installDoomEmacs = hm.dag.entryAfter ["writeBoundary"] '' - if [ ! -d "${config.home.homeDirectory}/.emacs" ]; then - git clone --depth=1 --single-branch "https://github.com/doomemacs/doomemacs" "${config.home.homeDirectory}/.emacs" + if [ ! -d "${config.home.homeDirectory}/.emacs.d" ]; then + git clone --depth=1 --single-branch "https://github.com/doomemacs/doomemacs" "${config.home.homeDirectory}/.emacs.d" fi ''; };