Move emacs into common
This commit is contained in:
parent
072838ff30
commit
7c86a1a947
|
@ -0,0 +1,77 @@
|
||||||
|
{ config, lib, pkgs, inputs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
imports = [ inputs.nix-doom-emacs.hmModule ];
|
||||||
|
|
||||||
|
config = lib.mkIf config.nathan.programs.emacs.enable {
|
||||||
|
# Dependencies of my emacs environment
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
# For markdown rendering
|
||||||
|
python39Packages.grip
|
||||||
|
# For graph generation
|
||||||
|
graphviz
|
||||||
|
sqlite
|
||||||
|
# For latex editing
|
||||||
|
texlive.combined.scheme-medium
|
||||||
|
# For notifications
|
||||||
|
libnotify
|
||||||
|
# For flash cards
|
||||||
|
anki
|
||||||
|
# For spelling
|
||||||
|
aspell
|
||||||
|
aspellDicts.en
|
||||||
|
aspellDicts.en-science
|
||||||
|
aspellDicts.en-computers
|
||||||
|
# Desktop file for org-protocol
|
||||||
|
(makeDesktopItem {
|
||||||
|
name = "org-protocol";
|
||||||
|
exec = "emacsclient %u";
|
||||||
|
comment = "Org protocol";
|
||||||
|
desktopName = "org-protocol";
|
||||||
|
type = "Application";
|
||||||
|
mimeTypes = [ "x-scheme-handler/org-protocol" ];
|
||||||
|
})
|
||||||
|
];
|
||||||
|
# Setup doom emacs
|
||||||
|
programs.doom-emacs = {
|
||||||
|
enable = true;
|
||||||
|
doomPrivateDir = ../../../doom.d;
|
||||||
|
emacsPackage = config.nathan.programs.emacs.package;
|
||||||
|
emacsPackagesOverlay = self: super: {
|
||||||
|
org-protocol-capture-html = self.trivialBuild {
|
||||||
|
pname = "org-protocol-capture-html";
|
||||||
|
ename = "org-protocol-capture-html";
|
||||||
|
version = "0.0.0";
|
||||||
|
packageRequires = [ self.s ];
|
||||||
|
src = pkgs.fetchFromGitHub {
|
||||||
|
owner = "alphapapa";
|
||||||
|
repo = "org-protocol-capture-html";
|
||||||
|
rev = "3359ce9a2f3b48df26329adaee0c4710b1024250";
|
||||||
|
hash = "sha256-ueEHJCS+aHYCnd4Lm3NKgqg+m921nl5XijE9ZnSRQXI=";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
anki-editor = self.trivialBuild {
|
||||||
|
pname = "anki-editor";
|
||||||
|
ename = "anki-editor";
|
||||||
|
version = "0.3.1";
|
||||||
|
packageRequires = with self; [
|
||||||
|
dash
|
||||||
|
request
|
||||||
|
];
|
||||||
|
src = pkgs.fetchFromGitHub {
|
||||||
|
owner = "billop";
|
||||||
|
repo = "anki-editor";
|
||||||
|
rev = "c11187a79a980a738af608c98f8de2cdc1d988be";
|
||||||
|
hash = "sha256-3R9bEu982a9Tq+hXy+ALFF/N2NwK9MsqDELFVGHV09I=";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
extraPackages = [ pkgs.mu ];
|
||||||
|
};
|
||||||
|
# Set editor
|
||||||
|
home.sessionVariables = {
|
||||||
|
EDITOR = "emacsclient";
|
||||||
|
VISUAL = "emacsclient";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
|
@ -1,82 +1,13 @@
|
||||||
{ config, lib, pkgs, inputs, ... }:
|
{ config, lib, pkgs, inputs, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
imports = [ inputs.nix-doom-emacs.hmModule ];
|
imports = [ ../../common/programs/emacs.nix ];
|
||||||
|
|
||||||
config = lib.mkIf config.nathan.programs.emacs.enable {
|
config = lib.mkIf config.nathan.programs.emacs.enable {
|
||||||
# Dependencies of my emacs environment
|
|
||||||
home.packages = with pkgs; [
|
|
||||||
# For markdown rendering
|
|
||||||
python39Packages.grip
|
|
||||||
# For graph generation
|
|
||||||
graphviz
|
|
||||||
sqlite
|
|
||||||
# For latex editing
|
|
||||||
texlive.combined.scheme-medium
|
|
||||||
# For notifications
|
|
||||||
libnotify
|
|
||||||
# For flash cards
|
|
||||||
anki
|
|
||||||
# For spelling
|
|
||||||
aspell
|
|
||||||
aspellDicts.en
|
|
||||||
aspellDicts.en-science
|
|
||||||
aspellDicts.en-computers
|
|
||||||
# Desktop file for org-protocol
|
|
||||||
(makeDesktopItem {
|
|
||||||
name = "org-protocol";
|
|
||||||
exec = "emacsclient %u";
|
|
||||||
comment = "Org protocol";
|
|
||||||
desktopName = "org-protocol";
|
|
||||||
type = "Application";
|
|
||||||
mimeTypes = [ "x-scheme-handler/org-protocol" ];
|
|
||||||
})
|
|
||||||
];
|
|
||||||
# Setup doom emacs
|
|
||||||
programs.doom-emacs = {
|
|
||||||
enable = true;
|
|
||||||
doomPrivateDir = ../../../doom.d;
|
|
||||||
emacsPackage = config.nathan.programs.emacs.package;
|
|
||||||
emacsPackagesOverlay = self: super: {
|
|
||||||
org-protocol-capture-html = self.trivialBuild {
|
|
||||||
pname = "org-protocol-capture-html";
|
|
||||||
ename = "org-protocol-capture-html";
|
|
||||||
version = "0.0.0";
|
|
||||||
packageRequires = [ self.s ];
|
|
||||||
src = pkgs.fetchFromGitHub {
|
|
||||||
owner = "alphapapa";
|
|
||||||
repo = "org-protocol-capture-html";
|
|
||||||
rev = "3359ce9a2f3b48df26329adaee0c4710b1024250";
|
|
||||||
hash = "sha256-ueEHJCS+aHYCnd4Lm3NKgqg+m921nl5XijE9ZnSRQXI=";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
anki-editor = self.trivialBuild {
|
|
||||||
pname = "anki-editor";
|
|
||||||
ename = "anki-editor";
|
|
||||||
version = "0.3.1";
|
|
||||||
packageRequires = with self; [
|
|
||||||
dash
|
|
||||||
request
|
|
||||||
];
|
|
||||||
src = pkgs.fetchFromGitHub {
|
|
||||||
owner = "billop";
|
|
||||||
repo = "anki-editor";
|
|
||||||
rev = "c11187a79a980a738af608c98f8de2cdc1d988be";
|
|
||||||
hash = "sha256-3R9bEu982a9Tq+hXy+ALFF/N2NwK9MsqDELFVGHV09I=";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
extraPackages = [ pkgs.mu ];
|
|
||||||
};
|
|
||||||
# Setup service
|
# Setup service
|
||||||
services.emacs = {
|
services.emacs = {
|
||||||
enable = config.nathan.programs.emacs.service;
|
enable = config.nathan.programs.emacs.service;
|
||||||
client.enable = true;
|
client.enable = true;
|
||||||
};
|
};
|
||||||
# Set editor
|
|
||||||
home.sessionVariables = {
|
|
||||||
EDITOR = "emacsclient";
|
|
||||||
VISUAL = "emacsclient";
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,6 +7,7 @@ with lib; with nLib; {
|
||||||
../options.nix
|
../options.nix
|
||||||
../common/programs/core.nix
|
../common/programs/core.nix
|
||||||
../common/programs/devel.nix
|
../common/programs/devel.nix
|
||||||
|
../common/programs/emacs.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
options = { };
|
options = { };
|
||||||
|
|
|
@ -15,6 +15,7 @@ with lib;
|
||||||
unzip
|
unzip
|
||||||
any-nix-shell
|
any-nix-shell
|
||||||
htop
|
htop
|
||||||
|
which
|
||||||
# For being able to update the flake
|
# For being able to update the flake
|
||||||
gitFull
|
gitFull
|
||||||
# For nslookup
|
# For nslookup
|
||||||
|
|
Loading…
Reference in New Issue