Extract emacs to its own submodule
This commit is contained in:
2
.gitmodules
vendored
2
.gitmodules
vendored
@@ -1,3 +1,3 @@
|
||||
[submodule "doom\\"]
|
||||
path = doom
|
||||
path = modules/applications/emacs/doom
|
||||
url = ssh://git@git.johnogle.info:2222/johno/doom-config.git
|
||||
|
||||
42
home.nix
42
home.nix
@@ -1,7 +1,6 @@
|
||||
{ config, pkgs, lib, ... }:
|
||||
|
||||
with import <nixpkgs> {};
|
||||
|
||||
{
|
||||
# Home Manager needs a bit of information about you and the paths it should
|
||||
# manage.
|
||||
@@ -39,33 +38,20 @@ with import <nixpkgs> {};
|
||||
|
||||
pkgs.bitwarden
|
||||
pkgs.element-desktop
|
||||
pkgs.emacs-all-the-icons-fonts
|
||||
pkgs.fd
|
||||
pkgs.fluffychat
|
||||
pkgs.fontconfig
|
||||
pkgs.graphviz
|
||||
pkgs.htop
|
||||
pkgs.jellyfin-media-player
|
||||
pkgs.less
|
||||
pkgs.isort
|
||||
pkgs.ncdu
|
||||
pkgs.nerdfonts
|
||||
pkgs.nil # nix lsp language server
|
||||
pkgs.nixfmt-rfc-style
|
||||
pkgs.pandoc
|
||||
pkgs.pinentry-qt
|
||||
pkgs.pipenv
|
||||
pkgs.poetry
|
||||
pkgs.python3
|
||||
#pkgs.pytest
|
||||
(pkgs.ripgrep.override {withPCRE2 = true;})
|
||||
pkgs.shellcheck
|
||||
pkgs.tmux
|
||||
pkgs.vlc
|
||||
];
|
||||
|
||||
fonts.fontconfig.enable = true;
|
||||
|
||||
# Home Manager is pretty good at managing dotfiles. The primary way to manage
|
||||
# plain files is through 'home.file'.
|
||||
home.file = {
|
||||
@@ -80,23 +66,8 @@ with import <nixpkgs> {};
|
||||
# org.gradle.daemon.idletimeout=3600000
|
||||
# '';
|
||||
|
||||
".config/emacs" = {
|
||||
source = fetchGit {
|
||||
url = "https://github.com/doomemacs/doomemacs.git";
|
||||
rev = "36e7aaa619342eff61b1daf3ac664f94d5272db7";
|
||||
};
|
||||
recursive = true;
|
||||
};
|
||||
};
|
||||
|
||||
home.activation.doomSync = lib.hm.dag.entryAfter [ "writeBoundary" ] (let
|
||||
emacs = pkgs.emacs;
|
||||
git = pkgs.git;
|
||||
in ''
|
||||
export PATH=${emacs}/bin:${git}/bin:$PATH
|
||||
${config.xdg.configHome}/emacs/bin/doom sync -u -j $((`nproc`/4*3))
|
||||
'');
|
||||
|
||||
# Home Manager can also manage your environment variables through
|
||||
# 'home.sessionVariables'. These will be explicitly sourced when using a
|
||||
# shell provided by Home Manager. If you don't want to manage your shell
|
||||
@@ -114,12 +85,13 @@ with import <nixpkgs> {};
|
||||
# /etc/profiles/per-user/johno/etc/profile.d/hm-session-vars.sh
|
||||
#
|
||||
home.sessionVariables = {
|
||||
DOOMLOCALDIR = "${config.xdg.dataHome}/doom";
|
||||
EDITOR = "emacs -nw";
|
||||
};
|
||||
|
||||
home.sessionPath = [
|
||||
"${config.xdg.configHome}/emacs/bin"
|
||||
];
|
||||
|
||||
imports = [
|
||||
./modules/applications/emacs/default.nix
|
||||
];
|
||||
|
||||
programs.bash.enable = true;
|
||||
@@ -135,11 +107,6 @@ with import <nixpkgs> {};
|
||||
|
||||
programs.command-not-found.enable = true;
|
||||
|
||||
programs.emacs = {
|
||||
enable = true;
|
||||
package = pkgs.emacs;
|
||||
};
|
||||
|
||||
programs.firefox = {
|
||||
enable = true;
|
||||
};
|
||||
@@ -221,6 +188,5 @@ with import <nixpkgs> {};
|
||||
|
||||
xdg = {
|
||||
enable = true;
|
||||
configFile."doom".source = ./doom;
|
||||
};
|
||||
}
|
||||
|
||||
53
modules/applications/emacs/default.nix
Normal file
53
modules/applications/emacs/default.nix
Normal file
@@ -0,0 +1,53 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
home.packages = [
|
||||
pkgs.emacs-all-the-icons-fonts
|
||||
pkgs.fontconfig
|
||||
pkgs.graphviz
|
||||
pkgs.isort
|
||||
pkgs.nerdfonts
|
||||
pkgs.nil # nix lsp language server
|
||||
pkgs.nixfmt-rfc-style
|
||||
(pkgs.ripgrep.override {withPCRE2 = true;})
|
||||
pkgs.pipenv
|
||||
pkgs.poetry
|
||||
pkgs.python3
|
||||
];
|
||||
|
||||
fonts.fontconfig.enable = true;
|
||||
|
||||
home.file = {
|
||||
".config/emacs" = {
|
||||
source = fetchGit {
|
||||
url = "https://github.com/doomemacs/doomemacs.git";
|
||||
rev = "36e7aaa619342eff61b1daf3ac664f94d5272db7";
|
||||
};
|
||||
recursive = true;
|
||||
};
|
||||
};
|
||||
|
||||
home.activation.doomSync = lib.hm.dag.entryAfter [ "writeBoundary" ] (let
|
||||
emacs = pkgs.emacs;
|
||||
git = pkgs.git;
|
||||
in ''
|
||||
export PATH=${emacs}/bin:${git}/bin:$PATH
|
||||
${config.xdg.configHome}/emacs/bin/doom sync -u -j $((`nproc`/4*3))
|
||||
'');
|
||||
|
||||
home.sessionVariables = {
|
||||
DOOMLOCALDIR = "${config.xdg.dataHome}/doom";
|
||||
EDITOR = "emacs -nw";
|
||||
};
|
||||
|
||||
home.sessionPath = [
|
||||
"${config.xdg.configHome}/emacs/bin"
|
||||
];
|
||||
|
||||
programs.emacs = {
|
||||
enable = true;
|
||||
package = pkgs.emacs;
|
||||
};
|
||||
|
||||
xdg.configFile."doom".source = ./doom;
|
||||
}
|
||||
Reference in New Issue
Block a user