home: refactor common files

Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
This commit is contained in:
2025-06-29 19:15:33 +05:30
parent 43660ff173
commit 87a6c1a862
8 changed files with 7 additions and 32 deletions

View File

@@ -0,0 +1,38 @@
{ config, pkgs, inputs, lib, ... }:
let
emacs = pkgs.emacs-git-pgtk;
configFile = ./config/emacs/config.org;
enable = true;
in
{
nixpkgs.overlays = [ inputs.emacs-overlay.overlays.default ];
home = {
shellAliases = rec {
e = "emacs";
enw = e + " -nw";
ec = "emacsclient";
ecc = ec + " -c";
ecnw = ec + " -nw";
};
};
programs.emacs = {
inherit enable;
package = pkgs.emacsWithPackagesFromUsePackage {
config = configFile;
package = emacs;
alwaysEnsure = true;
alwaysTangle = true;
defaultInitFile = true;
extraEmacsPackages = epkgs: with epkgs; [
use-package
(tree-sitter-langs.withPlugins (_: tree-sitter-langs.plugins))
];
};
};
services.emacs = {
inherit enable;
defaultEditor = true;
};
systemd.user.services.emacs.Service.Environment = "COLORTERM=truecolor";
}

View File

@@ -0,0 +1,20 @@
{ pkgs, ... }:
{
home.packages = with pkgs; [
fira-code
fira-mono
monoid
font-awesome
material-icons
material-design-icons
lohit-fonts.devanagari
lohit-fonts.gurmukhi
office-code-pro
eb-garamond
noto-fonts-cjk-sans
takao
liberation_ttf
];
fonts.fontconfig.enable = true;
}